OpenAPI export generates invalid OpenAPI spec

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

Ah sorry, one think I also noticed is that when you have s scheme definied as nullable (See screenshot) it creates

                      finishedAt:
                        anyOf:
                          - *ref_42
                          - type: 'null'

But this is also invalid, as type can only be

should be equal to one of the allowed values
allowedValues: array, boolean, integer, number, object, string

I don’t think that it is possible to null this value in OpenAPI thought
image.png
image.png

And thanks for the amazing software. I am still a bit confused on why it has so few users, but for creating OpenAPI is amazing.

Thanks for the feedback, the relevant requirements have been recorded.

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

We sincerely apologize for the inconvenience this issue has caused you. We’ve been able to reproduce the issue locally, and we will optimize it.

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?

Could you provide an ETA on this? This is a high priority, as the tool’s main functionality depends on ensuring the export to OAS is fully compliant.

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.