class Swagger::Object

Overview

Object is define a schema struct

This is no relationship with Objects structs.

Swagger::Object.new("User", "object", [
  Swagger::Property.new("id", "integer", "int32", example: 1),
  Swagger::Property.new("nickname", example: "icyleaf wang"),
  Swagger::Property.new("username", example: "icyleaf"),
  Swagger::Property.new("email", example: "[email protected]"),
  Swagger::Property.new("bio", "Personal bio"),
])

Defined in:

swagger/object.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, type : String, properties : Array(Property) | Nil = nil, items : self | String | Nil = nil) #

[View source]

Instance Method Detail

def items : String | Swagger::Object | Nil #

[View source]
def items=(items : String | Swagger::Object | Nil) #

[View source]
def name : String #

[View source]
def name=(name : String) #

[View source]
def properties : Array(Swagger::Property)? #

[View source]
def properties=(properties : Nil | Array(Swagger::Property)) #

[View source]
def type : String #

[View source]
def type=(type : String) #

[View source]