class AzuCLI::OpenAPI::TypeMapper

Overview

Maps Crystal types to OpenAPI types (reverse of SchemaMapper)

Defined in:

azu_cli/openapi/type_mapper.cr

Class Method Summary

Class Method Detail

def self.extract_required_fields(properties : Hash(String, String)) : Array(String) #

Extract required fields (non-nullable types)


[View source]
def self.properties_to_schemas(properties : Hash(String, String)) : Hash(String, Schema) #

Create schema properties from a hash of field definitions


[View source]
def self.to_schema(crystal_type : String, description : String | Nil = nil) : Schema #

Create OpenAPI schema from Crystal type


[View source]