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

Ability to specify more complete examples in a specification #2197

Closed
meastp opened this issue Apr 7, 2020 · 4 comments
Closed

Ability to specify more complete examples in a specification #2197

meastp opened this issue Apr 7, 2020 · 4 comments
Labels
examples requests for more or better examples in the specification

Comments

@meastp
Copy link

meastp commented Apr 7, 2020

I haven't thought a lot about this, but I'm writing a specification with a lot of examples (requests, responses)

  • I miss a way to specify parameters used to get a particular response.
  • I miss a way to combine multiple sequential examples to illustrate usage of the API. This could perhaps also be used to generate unit tests..?
@Simran-B
Copy link

Simran-B commented Feb 2, 2021

We also miss this ability. Some of our APIs can only be demonstrated in a meaningful way if a combination of path parameters, query parameters, HTTP headers and a JSON payload (with certain attributes and values) is used.

On top of that, it would be super valuable to be able to validate the examples against an actual server as integration/regression test for the documentation.

Here is Microsoft's take on this:

@handrews handrews added the examples requests for more or better examples in the specification label Jan 28, 2024
@lornajane
Copy link
Contributor

I think this is about not just examples, but which example goes with which other context. #2610 covers similar ground and while I am not sure how we would do this within a specification format, it is a real use case IMO.

@Simran-B
Copy link

I believe OpenAPI Workflows cover this use case but as far as I understand, a workflow description would live in a separate file to the OpenAPI specification:
https://github.com/OAI/sig-workflows/blob/main/versions/1.0.0.md

@handrews
Copy link
Member

The two requests are being tracked or addressed in:

I'm closing this issue in favor of those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples requests for more or better examples in the specification
Projects
None yet
Development

No branches or pull requests

4 participants