Class: SpecForge::Documentation::Document
- Inherits:
-
Object
- Object
- SpecForge::Documentation::Document
- Defined in:
- lib/spec_forge/documentation/document.rb,
lib/spec_forge/documentation/document/response.rb,
lib/spec_forge/documentation/document/operation.rb,
lib/spec_forge/documentation/document/parameter.rb,
lib/spec_forge/documentation/document/request_body.rb,
lib/spec_forge/documentation/document/response_body.rb
Overview
Represents the structured API documentation
This class is the central data structure for API documentation, containing all endpoints organized by path and HTTP method. It serves as the bridge between extracted test data and generators.
Defined Under Namespace
Classes: Operation, Parameter, RequestBody, Response, ResponseBody
Instance Method Summary collapse
-
#initialize(endpoints: {}) ⇒ Document
constructor
Creates a new document with normalized endpoints.
Constructor Details
#initialize(endpoints: {}) ⇒ Document
Creates a new document with normalized endpoints
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/spec_forge/documentation/document.rb', line 30 def initialize(endpoints: {}) endpoints = endpoints.transform_values do |operations| operations.transform_keys(&:downcase) .transform_values! { |op| Operation.new(**op) } end endpoints.deep_symbolize_keys! super end |