Skip to content

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
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.

3 participants