Class: Aikido::Zen::Request::Schema::Builder Private

Inherits:
Object
  • Object
show all
Defined in:
lib/aikido/zen/request/schema/builder.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(context: Aikido::Zen.current_context, config: Aikido::Zen.config) ⇒ Builder

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Builder.



11
12
13
14
15
16
# File 'lib/aikido/zen/request/schema/builder.rb', line 11

def initialize(context: Aikido::Zen.current_context, config: Aikido::Zen.config)
  @context = context
  @config = config
  @max_depth = @config.api_schema_collection_max_depth
  @max_props = @config.api_schema_collection_max_properties
end

Instance Method Details

#schemaObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
21
22
23
24
25
# File 'lib/aikido/zen/request/schema/builder.rb', line 18

def schema
  Request::Schema.new(
    content_type: body_data_type,
    body_schema: body_schema,
    query_schema: query_schema,
    auth_schema: AuthDiscovery.new(@context).schemas
  )
end