struct

Swagger::Object

Inherits Struct < Value < Object

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"),
])

Constructors

new(name : String, type : String, properties : Array(Property))
Source

Instance methods

name
Source
name=(name : String)
Source
properties
Source
properties=(properties : Array(Swagger::Property))
Source
type
Source
type=(type : String)
Source