class Open::Api::RequestBody

Included Modules

Defined in:

open-api/request_body.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(description : Nil | String, content : Hash(String, Open::Api::MediaType), required : Bool) #

[View source]
def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

[View source]
def self.new(description : Nil | String, content : Hash(String, Open::Api::MediaType)) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.new(description : Nil | String, content : Hash(String, Open::Api::MediaType) = Hash(String, Open::Api::MediaType).new, required : Bool = false) #

[View source]

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/*


[View source]
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/*


[View source]
def description : String | Nil #

[View source]
def description=(description : String | Nil) #

[View source]
def required : Bool #

Determines if the request body is required in the request. Defaults to false.


[View source]
def required=(required : Bool) #

Determines if the request body is required in the request. Defaults to false.


[View source]