Skip to content

feat: support nullable field of combine schemas #61

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Oct 26, 2021
Merged

feat: support nullable field of combine schemas #61

merged 1 commit into from
Oct 26, 2021

Conversation

keita1714
Copy link
Contributor

Summary

This PR solves the problem that nullable field for combine schemas(oneOf, anyOf, allOf) is not enabled.

Test Plan

The following yaml is processed correctly.

openapi: 3.0.0
info:
  version: 1.0.0
paths:
  /test:
    post:
      operationId: Test
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/SchemaA'
                - $ref: '#/components/schemas/SchemaB'
              nullable: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: string
components:
  schemas:
    SchemaA:
      type: object
      required:
        - a
      properties:
        a:
          type: integer
          format: int32
    SchemaB:
      type: object
      required:
        - b
      properties:
        b:
          type: string

@Himenon
Copy link
Owner

Himenon commented Oct 26, 2021

Thank you very much.

@Himenon Himenon merged commit a0f63f3 into Himenon:main Oct 26, 2021
@Himenon
Copy link
Owner

Himenon commented Oct 26, 2021

Already Published !

@keita1714 keita1714 deleted the nullable-multi-type-node branch October 26, 2021 14:04
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants