Class DtoGenerator
- Namespace
- TypedRest.CodeGeneration.Jvm.Dtos
- Assembly
- TypedRest.CodeGeneration.Jvm.dll
Generates types for the schemas in an OpenAPI/Swagger document.
public class DtoGenerator
- Inheritance
-
objectDtoGenerator
Constructors
DtoGenerator(INamingStrategy, TypeNameRegistry?)
Generates types for the schemas in an OpenAPI/Swagger document.
public DtoGenerator(INamingStrategy naming, TypeNameRegistry? typeNames = null)
Parameters
namingINamingStrategyDecides what the generated types are called.
typeNamesTypeNameRegistryKeeps the generated names from colliding. Share this with an endpoint generator writing to the same package.
Methods
Generate(IEnumerable<KeyValuePair<string, OpenApiSchema>>)
Generates a type for each of the schemas that needs one.
public IEnumerable<IJvmType> Generate(IEnumerable<KeyValuePair<string, OpenApiSchema>> schemas)
Parameters
schemasIEnumerable<KeyValuePair<string, OpenApiSchema>>