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 openapi examples in extent and edr-geojson #588

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

havardf
Copy link

@havardf havardf commented Nov 28, 2024

Adjust examples in the OpenAPI description so they match the schemas.

Copy link
Contributor

@chris-little chris-little left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thank you @havardf

Copy link
Collaborator

@m-burgoyne m-burgoyne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have modified the file to add the missing [].

@havardf
Copy link
Author

havardf commented Nov 28, 2024

I have modified the file to add the missing [].

I dont think that is quite correct, but I might be wrong of course. This - [[-180, -90, 180, 90]] will result in a: array of array of array of numbers, since the outer - is yaml syntax for creating an array, in addition to the [] syntax. Maybe it would be better use either - or [], rather than a mix?

@m-burgoyne
Copy link
Collaborator

The section is intended to show an array of example values

@havardf
Copy link
Author

havardf commented Nov 28, 2024

The section is intended to show an array of example values

Right, ok. But as I understand it, it is not allowed in the OpenAPI standard to use the example field to provide a list of examples. The type of example has to match the schema it is part of. There is the examples, which is a map of multiple examples, but that one seems to be allowed only in parameter and response objects.

@m-burgoyne
Copy link
Collaborator

And it looks like example has been deprecated as part of OpenAPI 3.1; JSON schema uses examples instead so all of the example values in the EDR schema will need to be reviewed. The errors you have identified are probably best fixed as part of the update for v1.2

@havardf
Copy link
Author

havardf commented Nov 28, 2024

Nice, the changes for examples in 3.1 seems very useful, and as far as I can tell, it will make it possible to do what you already have now :) It would be great to have this 3.1 version of the openapi soonish, I mean even as a draft version as part of ongoing work for v1.2.

@chris-little
Copy link
Contributor

EDR API SWG 2024-12-05 agreed to fix as part of OpenAPI V3.1 support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants