Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove inline namespace imports #69

Merged
merged 5 commits into from
Jun 12, 2023
Merged

Conversation

christianhelle
Copy link
Owner

This resolves #68

The fixes the issue when using system as a property name in the OpenAPI specifications. The problem was that it was conflicting with the [System.Text.Json.Serialization] attributes in the generated contracts

{
  "swagger": "2.0",
  "info": {
    "title": "XX",
    "version": "0.0.0"
  },
  "host": "x.io",
  "basePath": "/",
  "schemes": [
    "https"
  ],
  "definitions": {
    "Dummy": {
      "type": "object",
      "properties": {
        "system": {
          "type": "string",
          "description": "XX"
        }
      },
      "description": "XXX",
      "example": {
        "system": "Dummy"
      }
    }
  }
}

This was resolved by globally importing the System.Text.Json.Serialization namespace

@christianhelle christianhelle added the bug Something isn't working label Jun 12, 2023
@christianhelle christianhelle self-assigned this Jun 12, 2023
@christianhelle christianhelle merged commit 37e3b94 into main Jun 12, 2023
@christianhelle christianhelle deleted the system-property-build-error branch June 12, 2023 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Model definition with property named System results in class that does not compile
1 participant