pb33f / libopenapi

libopenapi is a fully featured, high performance OpenAPI 3.1, 3.0 and Swagger parser, library, validator and toolkit for golang applications.
https://pb33f.io/libopenapi/
Other
487 stars 64 forks source link

SpecIndex.GetAll* functions inconsistent - make consistent with GetAllSchemas. #309

Open crunk1 opened 4 months ago

crunk1 commented 4 months ago

GetAllSchemas returns references to schemas from components, inlined schemas, and $ref schemas.

Most of the other GetAll* functions only return references to components, like GetAllRequestBodies, for example:

GetAllRequestBodies will return all requestBodies found in the document (under components)

So GetAllRequestBodies won't return inlined or $ref request bodies.


Tangentially, the GetAllSchemas function doc is a little confusing. It says schemas come in the order inlined, components, refs. But then it says sorted by line number.

Also, thank you for your great libraries. :)