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

Update to OpenAPI version 3.1 #438

Merged
merged 6 commits into from
May 2, 2024
Merged

Update to OpenAPI version 3.1 #438

merged 6 commits into from
May 2, 2024

Conversation

cookeac
Copy link
Collaborator

@cookeac cookeac commented Dec 1, 2023

Update to OpenAPI 3.1

The following changes have been made to all OpenAPI files in the url-schemes folder:

  • Updated to "openapi": "3.1.0"
  • Updated to version 1.4 (ahead of the ADE 1.4 release)
  • Updated all tags to ADE-1.4-xxxx

The following changes have been made to JSON Schema files in the types and resources folders where "nullable": true was previously specified:

  • replace "type": "string" with "type": ["string", "null"]
  • replace "type": "number" with "type": ["number", "null"]
  • replace "type": "integer" with "type": ["integer", "null"]
  • replace "type": "boolean" with "type": ["boolean", "null"]
  • replace "type": "array" with "type": ["array", "null"]

Where a complex type (imported with "$ref" was previously nullable):

  • If the type was an object, add "type": ["object", "null"] before the $ref
  • If the type was a string (an enumeration or an icarDateTimeType), add "type": ["string", "null"] before the $ref

These last changes appear in examples online, but they are the ones that are most likely to interrupt code generation. Please test.

Resolves #239

@cookeac
Copy link
Collaborator Author

cookeac commented Dec 1, 2023

A further note - until it is merged, this PR will fail Speccy validation. This is because Speccy is deprecated and does not support OpenAPI 3.1. When this PR is merged, it will remove the GitHub action for Speccy, leaving us with Spectral validation.

@cookeac
Copy link
Collaborator Author

cookeac commented Apr 4, 2024

We agreed (meeting 2024-04-04) that we could merge this once #451 is addressed with a PR, as @AlexeyHardCode has tested code generation with C# at least.

@type is already deprecated, but the use of "enum": ["Link"] to provide a constant value causes errors in code generation under OpenAPI 3.1.
Fixes #451
@cookeac cookeac merged commit df6e1b3 into Develop May 2, 2024
2 checks passed
@cookeac cookeac deleted the 239-openapi-3.1 branch May 16, 2024 20:19
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.

Remove "enum" attribute from deprecated "@type" property of icarResourceType Moving to open api spec 3.1
1 participant