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: show siblings schema with oneOf #2576

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

AlexVarchuk
Copy link
Collaborator

What/Why/How?

fix a bug when oneOf has siblings and it doesn't render correct
fixes #641
fixes #743

   Main:
      title: Sale
      description: A request to authorize and capture funds.
      allOf:
        - $ref: '#/components/schemas/Anything1'
        - type: object
          properties:
            d:
              type: number
          oneOf:
            - $ref: '#/components/schemas/Anything2'
            - $ref: '#/components/schemas/Anything3'
    Anything1:
      type: object
      properties:
        a:
          type: string

    Anything2:
      type: object
      properties:
        b:
          type: string

    Anything3:
      type: object
      properties:
        c:
          type: string
   foo:
      type: object
      properties:
        property1:
          type: string
        property2:
          type: string
        property3:
          type: string
        property4:
          type: string
        property5:
          type: string
        property6:
          type: string
      oneOf:
        - required:
          - property1
          - property2
          - property6
        - required:
          - property1
          - property5

Reference

Tests

Screenshots (optional)

Before
Screenshot 2024-08-29 at 17 29 00
Screenshot 2024-08-29 at 17 40 03

After
Screenshot 2024-08-29 at 17 28 31

Screenshot 2024-08-29 at 17 39 28 Screenshot 2024-08-29 at 17 39 34

Check yourself

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

@AlexVarchuk AlexVarchuk self-assigned this Aug 29, 2024
@AlexVarchuk AlexVarchuk requested a review from a team as a code owner August 29, 2024 15:42
@AlexVarchuk AlexVarchuk merged commit 60d131b into main Aug 29, 2024
8 checks passed
@AlexVarchuk AlexVarchuk deleted the fix/sibling-schena-keys-with-oneOf branch August 29, 2024 18:22
@AlexVarchuk AlexVarchuk mentioned this pull request Oct 16, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants