Tags: getkin/kin-openapi
Tags
openapi2conv: preserve x-fields when converting from v2 to v3 (#1092) * Fix: Preserve extensions (like x-order) when converting OpenAPI v2 to v3 This commit fixes an issue where schema property-level extensions such as x-order were being lost during OpenAPI v2 to v3 conversion. The problem was in the ToV3SchemaRef function where schema.Extensions was being assigned to v3Schema.Extensions instead of schema.Value.Extensions. This meant that only SchemaRef-level extensions were preserved, but not the actual schema property extensions. Changes: - Modified ToV3SchemaRef to properly copy schema.Value.Extensions - Added comprehensive tests to verify extension preservation - Ensured both schema-level and property-level extensions are maintained - Verified nested properties also preserve their extensions Fixes #1091 * fix: remove the unnecessary copy loop Signed-off-by: saltbo <saltbo@foxmail.com> --------- Signed-off-by: saltbo <saltbo@foxmail.com>
openapi3filter: apply default values of an array in a query param wit… …h exploded = false (#1054) * issue1053: apply default values of an array in a query param with exploded set to false * issue1053: apply default values of an array in a query param with exploded set to false * issue1053: apply default values of an array in a query param with exploded set to false * add test case with explode set to true * refactor code
openapi2conv: convert references in nested additionalProperties schem… …as (#1047) * Convert references in nested additionalProperties schemas When the schema specified in additionalProperties contains another nested schema with additionalProperties, the references must be converted at all of levels of the nested schemas. * make toV3AdditionalProperties a non-exported function
openapi2: fix un/marshalling discriminator field (#1011) * fix: issue unmarshalling when discriminator field is set in openapi2.0 * revert original approach * update with different approach * Revert "update with different approach" This reverts commit 2db2b39. * v2 schema with discriminator field set as string * update ref link and comment * run docs.sh
openapi3: allow YAML-marshaling invalid specs (#977) * openapi3: allow YAML-marshaling invalid specs Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> * fixes Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com> --------- Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
PreviousNext