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

chore: update OpenAPI spec to 3.1 #49

Merged
merged 12 commits into from
Oct 8, 2024
Merged

Conversation

joscha
Copy link
Member

@joscha joscha commented Sep 26, 2024

September 25th, 2024
Upgrade schema to Openapi 3.1

via https://developer.affinity.co/#section/Changelog

Potential issues

Screenshot 2024-09-26 at 10 06 41 AM

Nullability

Nullability seems not to generate correctly (most definitely an issue).

Fix is here: OpenAPITools/openapi-generator#19687

This is generated from:

      "LocationsValue": {
        "title": "LocationsValue",
        "properties": {
          "type": {
            "description": "The type of value",
            "const": "location-multi",
            "type": "string"
          },
          "data": {
            "description": "The values for many locations",
            "items": {
              "$ref": "#/components/schemas/Location"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "data",
          "type"
        ],
        "type": "object"
      },

i.e.:

            "type": [
              "array",
              "null"
            ]

before (OpenAPI spec 3.0.1) this was:

            "type": "array",
            "nullable": true

Enum values

Enum values seem not to generate correctly as enums (possibly an issue)

          "type": {
            "description": "The type of value",
            "const": "location-multi",
            "type": "string"
          },

note the const instead of

          "type": {
            "description": "The type of value",
            "enum": [
              "location-multi"
            ],
            "type": "string"
          },

opened PR here: OpenAPITools/openapi-generator#19696

Error models

All previously generated error models seem to have gone (possibly not an issue?) Asked support about it.

  • ConflictError
  • EmptyMessageBodyError
  • GenericError
  • InvalidAcceptHeaderError
  • InvalidMessageBodyError
  • InvalidVersionHeaderError
  • MethodNotAllowedError
  • ModelError
  • RateLimitError
  • ServerError
  • TooManyMultipartFilesError

Update: most of these have been re-added:
Screenshot 2024-09-28 at 11 28 53 PM

@joscha joscha changed the title chore: update OpenAPI spec chore: update OpenAPI spec to 3.1 Oct 8, 2024
@joscha joscha enabled auto-merge October 8, 2024 10:59
@joscha joscha merged commit 0bc968b into main Oct 8, 2024
8 checks passed
@joscha joscha deleted the joscha/openapi-update-2024-09 branch October 8, 2024 10:59
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.

1 participant