swagger-parser
swagger-parser copied to clipboard
ResolveFully not resolving extensions of child schemas
trafficstars
At line 462 of ResolveFully class, extensions of only source schemas are being added to target schema. Shouldn’t it copy extensions of resolved schemas as well, similar to the way properties and required of resolved schemas are handled? https://github.com/swagger-api/swagger-parser/blob/2db8c628cbbfdd8afb972965698e011c93747b15/modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/util/ResolverFully.java#L462
can you add sample files or possibly a pr with failing test case?.
Here's a simple case to reproduce
openapi: "3.0.2"
info:
title: "Extension not inherited"
components:
schemas:
ResponseModel:
x-extension-ref: 1
type: object
required:
- data
properties:
data:
type: "string"
paths:
/test/extensions/not/inherited:
get:
responses:
200:
content:
application/json:
schema:
allOf:
- $ref: "#/components/schemas/ResponseModel"
- type: "object"
required:
- "data"
properties:
data2:
type: "string"
fixed in #1681 and #1837