You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Smithy models were generated from the legacy rest-api-spec. While working on this, I noticed that many of the default values were hidden in the param descriptions in the rest-api-spec. So, I extracted them and put them in the Smithy models, which later became schemas in OpenAPI.
When migrating this repo to native-OpenAPI, I also added the request and response bodies from ElasticSearch's OpenAPI spec into OpenSearch's, and replaced the OS parameter schemas with ES parameter schemas as well for 3 reasons:
Said schemas were also being used in the request/response bodies
The ES schemas also had higher resolutions
That's why those default values got lost during the translation. I'm going to compare the 2 sets of schemas to find the missing defaults. One thing to keep in mind: OpenAPI does not natively support default property inside a Parameter Object. That is, parameters pointing to the same schema cannot have their own default values but rather a shared default value via the shared schema. I've seen virtually identical parameters that only differ in the default values before. So, we will have to introduce another extension, x-default, for parameter objects.
What is the bug?
The latest OpenAPI specification lacks default parameter values.
What is the expected behavior?
Previous versions of the specification included default values for parameters in the schema.
Example: https://github.com/opensearch-project/opensearch-api-specification/blob/a44e6d92c006f1c03451a306a9e578f7ca48a862/OpenSearch.openapi.json#L485
The text was updated successfully, but these errors were encountered: