eclipse / microprofile-open-api

Microprofile open api
Apache License 2.0
131 stars 81 forks source link

Support for query parameter `format` is optional according to spec but is required by the TCK #503

Closed tjquinno closed 2 years ago

tjquinno commented 2 years ago

The spec states that support is "suggested but optional" for the format query parameter on requests to the /openapi endpoint.

But the PetStoreAppTest#testJsonResponseTypeWithQueryParameter test requires that support.

MikeEdgar commented 2 years ago

Good catch @tjquinno. Do you have any thoughts on having a test for that parameter whatsoever? It seems it would have to be too loose to make sense in the TCK.

tjquinno commented 2 years ago

The MP metrics spec prescribes an optional feature, and the TCK has a separate Maven artifact containing tests for it which a vendor who claims to implement that feature adds to the TCK driver:

https://github.com/eclipse/microprofile-metrics/tree/master/tck#additional-dependencies-for-optional-tck

TBH, that seems like overkill to me for the single test which exercises the optional query parameter support in MP OpenAPI. But at least there is that precedent if we want to follow it for MP OpenAPI. At least the groundwork would be set if more optional features emerge in the future (although I'm not generally a fan of gold-plating today for what might come later!).