class
AzuCLI::OpenAPI::TypeMapper
- AzuCLI::OpenAPI::TypeMapper
- Reference
- Object
Overview
Maps Crystal types to OpenAPI types (reverse of SchemaMapper)
Defined in:
azu_cli/openapi/type_mapper.crClass Method Summary
-
.extract_required_fields(properties : Hash(String, String)) : Array(String)
Extract required fields (non-nullable types)
-
.properties_to_schemas(properties : Hash(String, String)) : Hash(String, Schema)
Create schema properties from a hash of field definitions
-
.to_schema(crystal_type : String, description : String | Nil = nil) : Schema
Create OpenAPI schema from Crystal type
Class Method Detail
def self.extract_required_fields(properties : Hash(String, String)) : Array(String)
#
Extract required fields (non-nullable types)
Create schema properties from a hash of field definitions
Create OpenAPI schema from Crystal type