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: property with nested allOf #2083

Merged
merged 1 commit into from
Jul 19, 2022
Merged

Conversation

AlexVarchuk
Copy link
Collaborator

What/Why/How?

fix: #2079

Reference

Testing

openapi: 3.0.3
info:
  version: 0.0.1
  title: Test API
servers: []
tags:
  - name: Order
paths:
  /orders:
    summary: Product ordering
    post:
      tags:
        - Order
      summary: Create order
      description: |
        Create an order
      operationId: createProductOrder
      requestBody:
        $ref: "#/components/requestBodies/Order"
      responses:
        "201":
          $ref: "#/components/responses/OrderCreated"
components:
  schemas:
    ProductOfferingId:
      description: Original description for type `ProductOfferingId` which should have
        been overridden
      type: string
      example: SOME_PRODUCT
    AccountId:
      description: >
        Original description for type `AccountId` which should have been
        overridden (type with `readOnly: true`)
      type: string
      readOnly: true
      example: "123456789"
    ProductOrder:
      description: |
        Represents an order
      type: object
      properties:
        offeringId:
          description: |
            Overidden description for `offeringId`
          allOf:
            - $ref: "#/components/schemas/ProductOfferingId"
        billingAccountId:
          description: >
            Overridden description for `billingAccountId` (type with `readOnly:
            false`)
          readOnly: false
          allOf:
            - $ref: "#/components/schemas/AccountId"
  requestBodies:
    Order:
      required: true
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ProductOrder"
  responses:
    OrderCreated:
      description: Created
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ProductOrder"

Screenshots (optional)

Screenshot 2022-07-18 at 18 54 08

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 July 18, 2022 15:55
@AlexVarchuk AlexVarchuk self-assigned this Jul 18, 2022
@AlexVarchuk AlexVarchuk requested review from Oprysk and anastasiia-developer and removed request for a team July 18, 2022 15:55
@AlexVarchuk AlexVarchuk merged commit 7cc0500 into master Jul 19, 2022
@AlexVarchuk AlexVarchuk deleted the fix/property-with-nested-allOf branch July 19, 2022 06:57
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.

Attributes like readOnly and description not rendered correctly for allOf types in 2.0.0-rc.72
2 participants