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

Adds additional option to nodejs-request to generate code gor SDK generator #282

Open
wants to merge 5 commits into
base: feature/sdk-generation
Choose a base branch
from

Conversation

someshkoli
Copy link
Contributor

@someshkoli someshkoli commented Jun 8, 2020

Adds SDKGEN_enabled option to code generator

  • Toggles addition of import statements in the snippet
  • If set true uses statement to return response and error
  • Default value - false

Previously the generated snippet with raw body had double quote wrapping. This pr changes it to single quote to have consistency in quotes throughout the generated snippet.
Changes:

  • removes json.stringify where not necessary
  • sanitize raw body

 - Adds option SDKGEN_enabled
 - Adds addition snippets (if SDKGEN_enabled is true)
 - Adds test for extra snippets
 - Updates README for nodejs-request with new option
 - import statements in snippets are added only if SDKGEN_enabled is disabled
 - changes test for SDKGEN_enabled option
 - force uses single quote throughout the generate sdk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant