When exporting an API to the OpenAPI 3.0.0 specification, it gets converted into an invalid OpenAPI specification. It generates entries like this:
authorName:
description: The name of the book's author(s).
type: string
examples:
- Terry Goodkind
However, there is no examples field in the OpenAPI specification. This issue occurs when it is imported from an OpenAPI.json file that is valid and correctly uses only the example field. It also occurs when manually adding an example
We do apologize for the inconvenience. Currently, there are two places where the export will include examples, examples in data types and response examples. We will think about how to optimize them. Is there anything else I haven’t noticed?
I think the main problem is that OpenAPI (I am not thaat much into it) does only support one example. (There are some exceptions where examples can be used tho) - But if examples would be replaced by example everything would be fine (at least that what I saw) from my output.
Invalid:
authorName:
description: The name of the book's author(s).
type: string
examples:
- Terry Goodkind
Should be valid:
authorName:
description: The name of the book's author(s).
type: string
example: Terry Goodkind
Thanks for your precious feedback and we are really pleased to hear it. We do believe in dynamic development , evolving every day & if you think Apidog is good enough, you can recommend others about us, that would be highly appriciated.
Could this be reproduced on your end as having a non working spec is very problematic when it comes to using it for code generation with an generator outside of ApiDog
I’m trying to export to OpenAPI version 3.0 and examples on query params are still exported as “examples” where only “example” is allowed. Is there any update on when this will be fixed?
I second @YoamTCS . We are also looking forward to use Apidog as our primary API automation testing tool which ensure OpenAPI compliance. Apidog Team should prioritize this item. Thanks.