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

Fix Web API schema parsing problems #1066

Open
2 of 3 tasks
Michael-Herzog opened this issue Apr 18, 2024 · 1 comment
Open
2 of 3 tasks

Fix Web API schema parsing problems #1066

Michael-Herzog opened this issue Apr 18, 2024 · 1 comment
Assignees
Milestone

Comments

@Michael-Herzog
Copy link
Contributor

Michael-Herzog commented Apr 18, 2024

  • Circular references. There seems to be a massive problem with navigation properties.
    Validators like this report circular references.
  • The Operation ID of endpoints seems to be wrong. I couldn't find the place in the specification where it says there are forbidden characters, but all samples I saw do it in lower camel case (e.g. mySuperDuperOperationId). Some validators have problems with special chars like / which is contained in every single one of our operation ids.
  • The latest version of Open API is 3.1.0 we're using 3.0.1
  • "maxLength": -1, which describes fields with nvarchar(max) in our json is not valid.
@Michael-Herzog Michael-Herzog added this to the Future milestone Apr 18, 2024
@Michael-Herzog Michael-Herzog changed the title Fix Web API parsing problems Fix Web API schema parsing problems Apr 18, 2024
@mgesing
Copy link
Contributor

mgesing commented Apr 26, 2024

Circular references. There seems to be a massive problem with navigation properties.
Validators like this report circular references.

The validation message is "This API is valid, but it cannot be shown because it contains circular references", for example in case of Country > StateProvinces. This is a bug in the validator when converting these structures to JSON. Circular model references are quite common and certainly there is nothing wrong with them. The question is, how do a validator deal with it? Swashbuckle de-reference it via an option DefaultModelExpandDepth, which is set to 2 in our case.

mgesing added a commit that referenced this issue Apr 26, 2024
…RL friendly characters" and "Info section is missing a description"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants