-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Proposal for incorporating state transition into Open API #1329
Comments
@ptoora Just out of curiosity, have you looked at Link objects in the v3 spec? |
The Link section says:
This seems contradictory with REST, and specifically with HATEOAS, where the content of the runtime response should contain hypermedia links that are used to drive state transitions. |
@kephas There are two ways to look at this apparent mismatch:
Either way, any real change here to make this bridging more clear and elegant would be too big for the 3.x line, so this would be part of Moonwalk (4.0). |
I don't understand how there should be a mismatch between REST and OpenAPI. Roy Fielding's dissertation is very clear that the semantics of the representation of a resource is dictated by its media type. OpenAPI could be used to describe the format of each representation and, for each possible state transition, many informations could be provided:
All of those informations are supposed to be out of band in REST, so OpenAPI could be the vehicle for those. And the way OpenAPI currently describes request and response bodies is perfectly usable here too. |
This scale of change is best discussed in Moonwalk (and can be backported if relevant and we decide to keep the 3.x line going). Closing in favor of: |
Hello,
I believe that some ideas around this have already been expressed, but I'm coming at this from a QE approach. A typical application will have three components:
Behaviour is expressed in Acceptance Criteria and implemented as code.
OpenAPI beautifully handles contract integration.
What is missing is how we define (outside of behaviour) state transitions, relationships/flows between API end-points and resulting state change. If we could extend OpenApi to include the expressions of relationships between end-points (HATEOAS like) and the resulting state transitions, this would simply application build, as much more would be done declaratively, and would help with Contract testing serving Continuous Delivery. Consumer functional tests would use a stub provided by the service owner (e.g. in Wiremock) that enforced the contract and state expressed in OpenAPI
The text was updated successfully, but these errors were encountered: