swift-openapi-generator icon indicating copy to clipboard operation
swift-openapi-generator copied to clipboard

Add support for OpenAPI 3.2.0

Open czechboy0 opened this issue 3 months ago • 5 comments

https://github.com/OAI/OpenAPI-Specification/releases/tag/3.2.0

czechboy0 avatar Sep 20 '25 16:09 czechboy0

Changes: https://github.com/OAI/OpenAPI-Specification/compare/3.1.1...3.2.0

czechboy0 avatar Sep 20 '25 16:09 czechboy0

Rendered: https://spec.openapis.org/oas/v3.2.0.html

czechboy0 avatar Sep 20 '25 16:09 czechboy0

The new OAS v3.2 has an option to support other HTTP verbs via additionalProperties . Example:

get:
  description: Returns pets based on ID
  summary: Find pets by ID
  operationId: getPetsById
  responses:
    '200':
      description: pet response
      content:
        '*/*':
          schema:
            type: array
            items:
              $ref: '#/components/schemas/Pet'
    default:
      description: error payload
      content:
        text/html:
          schema:
            $ref: '#/components/schemas/ErrorModel'
parameters:
  - name: id
    in: path
    description: ID of pet to use
    required: true
    schema:
      type: array
      items:
        type: string
    style: simple
additionalOperations:
  COPY:
    description: Copies pet information based on ID
    summary: Copies pets by ID
    operationId: copyPetsById
    responses:
      '200':
        description: pet response
        content:
          '*/*':
            schema:
              type: array
              items:
                $ref: '#/components/schemas/Pet'
      default:
        description: error payload
        content:
          text/html:
            schema:
              $ref: '#/components/schemas/ErrorModel'

It would be awesome to include this

jcubit avatar Sep 28 '25 08:09 jcubit

Hi @jcubit - please file a separate issue for this, this one only tracks even accepting docs with version 3.2.0, but not particular features.

czechboy0 avatar Sep 28 '25 08:09 czechboy0

Hi @czechboy0, done! Apologies, I didn't notice that separate issues were made for each feature. I see the new query is also there :)

jcubit avatar Sep 28 '25 12:09 jcubit