ecotaxa / ecotaxa_back

Backend of the EcoTaxa application
GNU General Public License v3.0
6 stars 5 forks source link

Several endpoints request a schema but the schema is not referenced #71

Closed ThelmaPana closed 11 months ago

ThelmaPana commented 1 year ago

In api/paths/object_set/parents/post/requestBody/content/application/json there is a schema, but this schema only has title, type and items. The $ref field found in other schemas is absent, and there is no corresponding schema in #/components/schemas.

This is the case for:

Shouldn't these schemas have a $ref like the others?

grololo06 commented 11 months ago

Hello! $ref is only needed (in theory) when the structure is shared b/w several entry points. E.g. MinUserModel. See https://swagger.io/docs/specification/using-ref/ for more details. But I see that some blocks, even if used a single time, gave birth to $ref, a bit of mystery. In the entry points you name, there is most probably nothing shared with others.