ErikWittern / openapi-snippet

Generates code snippets for given Swagger / Open API documents
MIT License
115 stars 66 forks source link

consider examples for parameter values #82

Closed michaelgwelch closed 2 years ago

michaelgwelch commented 2 years ago

[UPDATE May 4, 2022] Locally I have this work complete, but I fear it'll be too large of a PR. I'm going to try to start to break it up into smaller pieces


If example isn't set for a parameter, then go ahead and check for examples. If that is present, then use the value from the first entry as the parameter value.

Note: The value of the fist entry must have type string. If no suitable value is found, then the code snippet will not have a value.

Fix #81

UPDATES: Most recent push still requires refactoring, but it's more complete that previous pushes and includes testing.

Still need to

michaelgwelch commented 2 years ago

I just noticed there is a test folder. I will run the tests and add additional coverage based on new functionality.

michaelgwelch commented 2 years ago

This has been replaced by #86