-
Notifications
You must be signed in to change notification settings - Fork 286
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
Extended library with Information about "responses" w/ type information #163
base: master
Are you sure you want to change the base?
Conversation
Adding in Individumm's changes which add the response code into the mix
Also added optional parameters to typescript definitions |
@bradleat: Is there an example I could look at? |
@wcandillon apologies. Is the example still needed? What would you want to see? A source spec and a template that makes use of the new variables? |
lib/typescript.js
Outdated
@@ -55,6 +55,18 @@ function convertType(swaggerType, swagger) { | |||
var property = convertType(propertyType); | |||
property.name = propertyName; | |||
typespec.properties.push(property); | |||
// see if property is required |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change and the one in type.mustache
seems to be unrelated to the other change with the response, is my understanding correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is. I think you have the correct understanding.
One goal was to give in response type information to the templates.
The other goal was to add the information about optional properties
@bradleat Can you solve the conflict? |
Hi guys, When will this PR be merged? What is the current status of it? Best Regards |
@@ -62,6 +62,24 @@ function convertType(swaggerType, swagger) { | |||
typespec.properties.push(property); | |||
}); | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This _forEach should replace the above one, otherwise, it will result in duplicated typescript properties.
Adding onto #127 we now have type information on the {{responses}} object.