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

Add atomic operations to OpenAPI document #3248

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

justin-tay
Copy link
Collaborator

Description

This adds the JSON API atomic operations to the OpenAPI document.

This also fixes issues with the generation of OpenAPI 3.1 documents and other issues.

  • The specVersion and openapi values on OpenAPI are now appropriately set when configured to use OpenAPI 3.1
  • The /info/version is a required property and is now set to an empty string if null.
  • The /info/version is now not overridden if the annotation does not set the version.
  • OpenAPI documents with a version other than the default will now generate a correct reference to its schema if the model is not versioned.

Motivation and Context

This makes the atomic operations feature more visible and easier to use.

There are 8 different operations that can be performed in atomic operations

  • Creating Resources
  • Updating Resources
  • Deleting Resources
  • Updating To-One Relationships
  • Deleting To-One Relationships
  • Creating To-Many Relationships
  • Updating To-Many Relationships
  • Deleting To-Many Relationships

The specific request bodies needed for each of the operations can be difficult to remember without examples so the examples and descriptions were added to make it easier.

How Has This Been Tested?

Added / changed the appropriate unit / integration tests.

Also tested that the generate OpenAPI document can be successfully processed by the openapi-generator-cli.

Screenshots (if appropriate):

atomic

License

I confirm that this contribution is made under an Apache 2.0 license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

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.

None yet

1 participant