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

feat: callbacks support #54

Merged
merged 2 commits into from
Nov 4, 2019
Merged

Conversation

karol-maciaszek
Copy link
Contributor

@karol-maciaszek karol-maciaszek commented Oct 18, 2019

Introduces an IHttpOperation extension called IHttpCallbackOperation. The new interface carries additionally the name of callback operation.

The motivation behind extending the interface: callbacks in OASv3 spec are wrapped in an object with callback name as property and operation as value. SL's way of representing such objects is to convert it to an array and add a property inside with the key name (see operations array, examples array, etc.). This change is compatible with that approach.

Related PR: stoplightio/prism#716
Related issue: stoplightio/prism#331
The spec: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#callbackObject
Callback example: https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v3.0/callback-example.yaml

@karol-maciaszek karol-maciaszek changed the title feat: callbacks support [wip] feat: callbacks support Oct 18, 2019
@karol-maciaszek karol-maciaszek self-assigned this Oct 18, 2019
@karol-maciaszek karol-maciaszek changed the title [wip] feat: callbacks support feat: callbacks support Oct 29, 2019
src/http-spec.ts Outdated Show resolved Hide resolved
src/http-spec.ts Show resolved Hide resolved
Copy link
Contributor

@XVincentX XVincentX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ok but let's wait for somebody else to make sure they're ok with the changes.

@karol-maciaszek karol-maciaszek merged commit 45594fe into master Nov 4, 2019
@karol-maciaszek karol-maciaszek deleted the feat/http-spec-callbacks branch November 4, 2019 14:17
@stoplight-bot
Copy link
Collaborator

🎉 This PR is included in version 11.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants