class Open::Api::RequestBody
- Open::Api::RequestBody
- Reference
- Object
Included Modules
- JSON::Serializable
- YAML::Serializable
Defined in:
open-api/request_body.crConstructors
- .new(description : Nil | String, content : Hash(String, Open::Api::MediaType), required : Bool)
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .new(description : Nil | String, content : Hash(String, Open::Api::MediaType))
- .new(pull : JSON::PullParser)
- .new(description : Nil | String, content : Hash(String, Open::Api::MediaType) = Hash(String, Open::Api::MediaType).new, required : Bool = false)
Instance Method Summary
-
#content : Hash(String, Open::Api::MediaType)
The content of the request body.
-
#content=(content : Hash(String, Open::Api::MediaType))
The content of the request body.
- #description : String | Nil
- #description=(description : String | Nil)
-
#required : Bool
Determines if the request body is required in the request.
-
#required=(required : Bool)
Determines if the request body is required in the request.
Constructor Detail
def self.new(description : Nil | String, content : Hash(String, Open::Api::MediaType), required : Bool)
#
def self.new(description : Nil | String, content : Hash(String, Open::Api::MediaType))
#
def self.new(description : Nil | String, content : Hash(String, Open::Api::MediaType) = Hash(String, Open::Api::MediaType).new, required : Bool = false)
#
Instance Method Detail
def content : Hash(String, Open::Api::MediaType)
#
The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
def content=(content : Hash(String, Open::Api::MediaType))
#
The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
def required=(required : Bool)
#
Determines if the request body is required in the request. Defaults to false.