Skip to content

Extended library with Information about "responses" w/ type information#163

Closed
bradleat wants to merge 9 commits into
wcandillon:masterfrom
bradleat:master
Closed

Extended library with Information about "responses" w/ type information#163
bradleat wants to merge 9 commits into
wcandillon:masterfrom
bradleat:master

Conversation

@bradleat

Copy link
Copy Markdown

Adding onto #127 we now have type information on the {{responses}} object.

@bradleat

Copy link
Copy Markdown
Author

Also added optional parameters to typescript definitions

@wcandillon

Copy link
Copy Markdown
Owner

@bradleat: Is there an example I could look at?

@bradleat

Copy link
Copy Markdown
Author

@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?

Comment thread lib/typescript.js
var property = convertType(propertyType);
property.name = propertyName;
typespec.properties.push(property);
// see if property is required

Copy link
Copy Markdown
Owner

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?

Copy link
Copy Markdown
Author

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

@wcandillon

Copy link
Copy Markdown
Owner

@bradleat Can you solve the conflict?

@fantun3s

fantun3s commented May 9, 2017

Copy link
Copy Markdown

Hi guys,

When will this PR be merged? What is the current status of it?
I really need this feature.

Best Regards

Comment thread lib/typescript.js
typespec.properties.push(property);
});
}

Copy link
Copy Markdown

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.

@bradleat bradleat closed this Jun 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants