Sha256: 2a1820df381f2bd3fc0ef60b72bd6af734e279d3874037f70ec964e4fe1f8c2d

Contents?: true

Size: 631 Bytes

Versions: 13

Compression:

Stored size: 631 Bytes

Contents

module JsonapiSwaggerHelpers
  class CreateAction
    include JsonapiSwaggerHelpers::Writeable

    def action_name
      :create
    end

    def generate
      _self = self

      define_schema
      @node.operation :post do
        key :description, _self.description
        key :operationId, _self.operation_id
        key :tags, _self.all_tags

        parameter do
          key :name, :payload
          key :in, :body

          schema do
            key :'$ref', _self.request_schema_id
          end
        end

        response 200 do
          key :description, 'API Response'
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
jsonapi_swagger_helpers-0.6.6 lib/jsonapi_swagger_helpers/create_action.rb
jsonapi_swagger_helpers-0.6.5 lib/jsonapi_swagger_helpers/create_action.rb
jsonapi_swagger_helpers-0.6.4 lib/jsonapi_swagger_helpers/create_action.rb
jsonapi_swagger_helpers-0.6.3 lib/jsonapi_swagger_helpers/create_action.rb
jsonapi_swagger_helpers-0.6.2 lib/jsonapi_swagger_helpers/create_action.rb
jsonapi_swagger_helpers-0.6.1 lib/jsonapi_swagger_helpers/create_action.rb
jsonapi_swagger_helpers-0.6.0 lib/jsonapi_swagger_helpers/create_action.rb
jsonapi_swagger_helpers-0.5.4 lib/jsonapi_swagger_helpers/create_action.rb
jsonapi_swagger_helpers-0.5.3 lib/jsonapi_swagger_helpers/create_action.rb
jsonapi_swagger_helpers-0.5.2 lib/jsonapi_swagger_helpers/create_action.rb
jsonapi_swagger_helpers-0.5.1 lib/jsonapi_swagger_helpers/create_action.rb
jsonapi_swagger_helpers-0.5.0 lib/jsonapi_swagger_helpers/create_action.rb
jsonapi_swagger_helpers-0.4.3 lib/jsonapi_swagger_helpers/create_action.rb