create-openapi-repo icon indicating copy to clipboard operation
create-openapi-repo copied to clipboard

automatically generate code snippets

Open jgabriels opened this issue 6 years ago • 10 comments

I have a fully working code generator: https://github.com/Direct-Freight/df-api-docs/blob/master/scripts/generate-code-samples.js It's called during the build: https://github.com/Direct-Freight/df-api-docs/blob/master/scripts/build.js You can see what the final results looks like here: http://apidocs.directfreight.com/#tag/boards

jgabriels avatar Mar 03 '18 17:03 jgabriels

@jgabriels wow! this looks amazing Thanks so much for this! I will review this ASAP!

RomanHotsiy avatar Mar 05 '18 09:03 RomanHotsiy

Do this works with OAS3 ?

jalberto avatar Feb 05 '19 11:02 jalberto

Any progress on getting this in? This would be fantastic for so many needing easy samples.

TobiTenno avatar Mar 13 '19 17:03 TobiTenno

From: https://github.com/Rebilly/ReDoc/issues/477

Automatic code samples generation is out of scope of ReDoc unfortuanatelly

My code is basically gluing several existing modules together. It probably wouldn't be too hard to take it and make it an independent module that someone could install on top of the official redocly. I may do it some day but currently have no plans to do it myself.

jgabriels avatar Mar 13 '19 21:03 jgabriels

Automatic code samples generation is out of scope of ReDoc unfortuanatelly

True. But it is not of scope for this project!

@jgabriels I still want to pull this code in. Sorry for the delay though. I realize that so much time passed. I just don't have enough time for everything and this PR requires have to be read and tested carefully.

Would mind me reopening this PR? Thanks!

RomanHotsiy avatar Mar 14 '19 06:03 RomanHotsiy

Oops, sorry. I misunderstood. I reopened the pull request. I can try to update it at some point to get it current.

jgabriels avatar Mar 14 '19 13:03 jgabriels

Any chance we can resolve this to get some code snippets generated? swagger-snippet has updated to allow OpenAPI 3.0.x as well! https://github.com/ErikWittern/swagger-snippet/issues/16

wordtracker avatar Mar 15 '19 17:03 wordtracker

Any progress on merging it?

MaryAlex avatar Mar 29 '19 17:03 MaryAlex

Any progress with this PR?

rodrigobustamante avatar Jun 26 '19 22:06 rodrigobustamante

Any progress with the PR

meenun12 avatar Jun 03 '20 13:06 meenun12