Skip to content

Create flattened type map #23

@wwwlicious

Description

@wwwlicious

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions