openapi: 3.1.0
info:
  title: Sample API
  version: 1.0.0
paths:
  /products:
    post:
      operationId: createProduct
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  if:
                    properties:
                      kind:
                        type: string
                  then:
                    properties:
                      name:
                        type: string
                      newField:
                        type: string
                    required:
                      - newField
                  else:
                    properties:
                      code:
                        type: string
                      newField:
                        type: string
                    required:
                      - newField
                  contains:
                    type: object
                    properties:
                      id:
                        type: string
                      newField:
                        type: string
                  prefixItems:
                    - type: object
                      properties:
                        label:
                          type: string
                        newField:
                          type: string
                  propertyNames:
                    type: string
                  unevaluatedProperties:
                    type: object
                    properties:
                      tag:
                        type: string
                      newField:
                        type: string
                  contentSchema:
                    type: object
                    properties:
                      encoding:
                        type: string
                      newField:
                        type: string
                  patternProperties:
                    "^x-":
                      type: object
                      properties:
                        ext:
                          type: string
                        newField:
                          type: string
                  dependentSchemas:
                    name:
                      type: object
                      properties:
                        title:
                          type: string
                        newField:
                          type: string
      responses:
        "200":
          description: OK
