class Swagger::Object
- Swagger::Object
- Reference
- 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.crConstructors
Instance Method Summary
- #items : String | Swagger::Object | Nil
- #items=(items)
- #name : String
- #name=(name)
- #properties : Array(Swagger::Property)?
- #properties=(properties)
- #type : String
- #type=(type)
Constructor Detail
def self.new(name : String, type : String, properties : Array(Property)? = nil, items : self | String? = nil)
#