Skip to content

Conversation

@rbordeanu
Copy link
Contributor

fix swagger templates to correctly handle code generation in case of token authorization

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Proposed changes

Describe the nature of this change. What problem does it address?

I added two new configuration options, to increase the flexibility of code generation:

'--keywords' option in command line to set additional keywords on the generated node along the default, 'node-red-node gen'

'--category' option in command line to configure node category instead of the default, 'function'

Checklist

Put an x in the boxes that apply

  • I have read the contribution guidelines
  • For non-bugfix PRs, I have discussed this change on the mailing list/slack team.
  • I have run grunt to verify the unit tests pass
  • I have added suitable unit tests to cover the new/changed functionality

--category option support
'--category' option in command line to configure node category instead of the default, 'function'

--keywords option support
'--keywords' option in command line to set additional keywords on the generated node along the default, 'node-red-node gen'
@coveralls
Copy link

coveralls commented Feb 5, 2018

Coverage Status

Coverage increased (+1.3%) to 74.627% when pulling d86f0d0 on rbordeanu:pr/keywords-option into 504a4c0 on node-red:master.

@kazuhitoyokoi
Copy link
Member

@rbordeanu Thank you for your pull request. I think that default keyword, "node-red-nodegen" will be overwritten when users set keywords option. The default keyword is needed when users publish their node on flow library to identify the generated nodes. (If users want to delete it, they need to modify package.json manually) Could you remain "node-red-nodegen" and add additional keywords?

@kazuhitoyokoi
Copy link
Member

kazuhitoyokoi commented Feb 8, 2018

@rbordeanu Sorry, I was wrong. I overlooked concat() in your code. Your code always uses the default keyword.
@HiroyasuNishiyama Could you merge the pull request?

@HiroyasuNishiyama HiroyasuNishiyama merged commit ef18d1d into node-red:master Feb 8, 2018
@kazuhitoyokoi
Copy link
Member

@HiroyasuNishiyama Thank you 👍

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.

4 participants