-
Notifications
You must be signed in to change notification settings - Fork 3
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 Open API document generated by Hakunapi and used by demo service #69
Comments
This should be fixed by #71 (at least according to my manual and integration tests) |
Thanks. Tested by setting up demo service on a local machine from features.war build from latest code in main (that should have #71 merged). The demo service on a local machine give Open API document that is OK according to Swagger editor, but still one error: Structural error at info.contact.email because by default email address is empty string '' in demo conf. This is not a bug in Hakunapi, but in configuration of demo application. When removing api.contact.email from addresses.properties it results in Open API document with info.contact.email to be 'N/A'. Swagger editor complains about this too. Maybe it would be better to leave an optional info.contact.email element out of Open API output if not set in conf file? Anyway when setting api.contact.email in conf as a valid formatted email address then demo service returns an Open API document that can be viewed without complaints in Swagger editor too. |
Maybe instructions in https://github.com/nlsfi/hakunapi/tree/main/examples/finnish_addresses in section "Preparing for production" could ask installers of demo service to set their contact information (including that info.contact.email) to get Open API document that Swagger Editor swallows too... |
Allowed null/missing contact information to omit the contact element from OpenAPI description altogether in #75. Changed |
Currently at least Open API document represented as JSON provided by https://beta-paikkatieto.maanmittauslaitos.fi/inspire-addresses/features/v1/api.json fails when analyzing it in Swagger editor (or other tools).
Gives multiple errors like:
Structural error at paths./.get.responses.200.content.text/html
should NOT have additional properties
additionalProperty: exampleSetFlag
Jump to line 33
When accessing Open API document as HTML content in browser (https://beta-paikkatieto.maanmittauslaitos.fi/inspire-addresses/features/v1/api) HTML document is shown without errors.
The issue is related to the
exampleSetFlag
property (that informs "whether an example is set to null intentionally") in OpenAPI class of Hakunapi - this property should not be serialized to Open API document output.The text was updated successfully, but these errors were encountered: