Class: Apiwork::Adapter::Serializer::Error::Default::APIBuilder
- Inherits:
-
Builder::API::Base
- Object
- Builder::API::Base
- Apiwork::Adapter::Serializer::Error::Default::APIBuilder
- Defined in:
- lib/apiwork/adapter/serializer/error/default/api_builder.rb
Instance Attribute Summary
Attributes inherited from Builder::API::Base
Instance Method Summary collapse
Methods inherited from Builder::API::Base
#enum, #enum?, #initialize, #object, #type?, #union
Constructor Details
This class inherits a constructor from Apiwork::Adapter::Builder::API::Base
Instance Method Details
#build ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/apiwork/adapter/serializer/error/default/api_builder.rb', line 9 def build enum(:error_layer, values: %w[http contract domain]) object(:error_issue) do |object| object.string(:code) object.string(:detail) object.array(:path) do |array| array.of(:union) do |union| union.variant(&:string) union.variant(&:integer) end end object.string(:pointer) object.object(:meta) end object(data_type) do |object| object.reference(:layer, to: :error_layer) object.array(:issues) do |element| element.reference(:error_issue) end end end |