-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Index.GetAllSchemas()
regression in values returned
#280
Comments
Looks to have been introduced in v0.16.1 |
Specifically this commit 1e22e02 |
An example spec that returns more than the 1 schema actually included in it from openapi: 3.1.0
paths:
'/test':
get:
responses:
'200':
content:
application/json:
schema:
type: object
examples:
test example:
value:
type: Object
description: test
properties:
lineItems:
type: Array
description: test
properties:
description:
required: false
taxRateRef:
type: Object
description: test
properties:
effectiveTaxRate:
type: Number
description: test
required: false
required: true
paymentAllocations:
type: Array
description: test
properties:
payment:
type: Object
description: test
properties:
accountRef:
type: Object |
Looks like this change introduced the issue |
PR to fix this here: #281 I don't fully understand the root cause but the issue seems to have been introduced by not continue any further logic in this file when examples was detected. This change ensures that the original behaviour is retained while also handling the case the change in the commit that regressed this is also addressed |
Strange that this caused a regression, but thank you for fixing it! |
Between versions
v0.15.14
andv0.16.2
there seems to have been a regression in whatGetAllSchemas()
from the index returns.Basically we are seeing "schema" like objects under
examples
being returned which shouldn't be as they aren't schemas but just examplesHere is a spec that shows the issue https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Lending.yaml
For example line
69399
is a object that is being returned in the list fromGetAllSchemas()
The text was updated successfully, but these errors were encountered: