scribe icon indicating copy to clipboard operation
scribe copied to clipboard

Introduce Adding examples to the OAS3 Media Type Object (Request / Response)

Open Dinushasilva opened this issue 1 year ago • 2 comments

This PR introduces to create an entire request or response examples by leveraging existing OAS3 capabilities by allowing multiple examples with arbitrary names.

Having multiple examples will increase user experience as it allows consumers to see different ways that an API can be consumed / requested.

This is by default supported in most documentation tooling to help users pick which example they'd like to see. We could also expand examples into Objects and Parameters at a later stage.

Before:

Screenshot 2024-05-18 163231

After:

Scalar:

image

image

Rapidoc

image

image

Stoplight

image

image

Swagger

image

image

I can update the docs, if we can agree on this implementation.

Thank you!

Dinushasilva avatar May 19 '24 13:05 Dinushasilva

Been busy, will take a look at these sometime this week or next.

shalvah avatar Jun 10 '24 20:06 shalvah

FYI, I've merged https://github.com/knuckleswtf/scribe/pull/792, which I think implements some of this functionality.

shalvah avatar Jun 17 '24 20:06 shalvah