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: "icyleaf.cn@gmail.com"),
  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, items : self | String? = nil) #

[View source]

Instance Method Detail

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

[View source]
def items=(items) #

[View source]
def name : String #

[View source]
def name=(name) #

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

[View source]
def properties=(properties) #

[View source]
def type : String #

[View source]
def type=(type) #

[View source]