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

Create flattened type map #23

Open
wwwlicious opened this issue Apr 9, 2017 · 0 comments
Open

Create flattened type map #23

wwwlicious opened this issue Apr 9, 2017 · 0 comments
Milestone

Comments

@wwwlicious
Copy link
Owner

wwwlicious commented Apr 9, 2017

Return all the types that are being utilised in all classes/props for maximum x-plat compatibility (i.e. primitives).

It would be helpful to include this as a type map that flattens out all types used in the request and response dtos. It should walk all request and response types and properties and where not inherited from a primitive should also be walked. Collection item types/generics should also be checked. Duplicates should be discarded.

Primitives should be returned normalised, so System.String should just be string. number should be returned for all variants int, Int64, double, uInt32, short etc. (see openApi spec for example), bool for booleans, drop arrays so just string for string[] etc but collections other than array should be returned as they are.

Recursive types would need to be handled/escaped also.

This would allow easier checks and warnings where non-primitive types that are not explicitly returned in the type spec than Clr types are being used which potentially reduce reuse or compatibility across different languages/platforms when generating dtos/contracts.

@wwwlicious wwwlicious modified the milestone: 2.0 May 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant