Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResolveFully not resolving extensions of child schemas #1266

Closed
namit26 opened this issue Dec 7, 2019 · 3 comments
Closed

ResolveFully not resolving extensions of child schemas #1266

namit26 opened this issue Dec 7, 2019 · 3 comments

Comments

@namit26
Copy link

namit26 commented Dec 7, 2019

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?

@r-sreesaran
Copy link
Contributor

can you add sample files or possibly a pr with failing test case?.

@EricAntoni
Copy link

EricAntoni commented Mar 2, 2021

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"

@frantuma
Copy link
Member

fixed in #1681 and #1837

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants