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

fix: sibling for openapi 3.1 #2112

Merged
merged 1 commit into from
Aug 2, 2022
Merged

fix: sibling for openapi 3.1 #2112

merged 1 commit into from
Aug 2, 2022

Conversation

AlexVarchuk
Copy link
Collaborator

What/Why/How?

fixes: #2042
Seems it is broken when we override recursive check logic.

{
      "openapi": "3.1.0",
      "info": {
        "title": "AA",
        "version": "1.0"
      },
      "paths": {
        "/test": {
          "get": {
            "operationId": "test",
            "responses": {
              "200": {
                "content": {
                  "application/json": {
                    "schema": {
                      "type": "object",
                      "properties": {
                        "testAttr": {
                          "description": "Overriden description",
                          "$ref": "#/components/schemas/Test"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
      },
      "components": {
        "schemas": {
          "Test": {
            "type": "object",
            "description": "Refed description"
          }
        }
      }
    }

Reference

Testing

Screenshots (optional)

Screenshot 2022-08-01 at 17 56 55

Check yourself

  • Code is linted
  • Tested
  • All new/updated code is covered with tests

@AlexVarchuk AlexVarchuk requested a review from a team as a code owner August 1, 2022 14:58
@AlexVarchuk AlexVarchuk self-assigned this Aug 1, 2022
@AlexVarchuk AlexVarchuk requested review from anastasiia-developer and removed request for a team August 1, 2022 14:58
@AlexVarchuk AlexVarchuk merged commit 0b1a790 into master Aug 2, 2022
@AlexVarchuk AlexVarchuk deleted the fix/sibling-3.1 branch August 2, 2022 11:40
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

Successfully merging this pull request may close these issues.

Siblings of $ref do not override the referenced object
2 participants