Module: Apiwork::Export
- Defined in:
- lib/apiwork/export.rb,
lib/apiwork/export/zod.rb,
lib/apiwork/export/base.rb,
lib/apiwork/export/sorbus.rb,
lib/apiwork/export/apiwork.rb,
lib/apiwork/export/open_api.rb,
lib/apiwork/export/pipeline.rb,
lib/apiwork/export/registry.rb,
lib/apiwork/export/zod_mapper.rb,
lib/apiwork/export/type_script.rb,
lib/apiwork/export/sorbus_mapper.rb,
lib/apiwork/export/type_analysis.rb,
lib/apiwork/export/apiwork_mapper.rb,
lib/apiwork/export/pipeline/writer.rb,
lib/apiwork/export/surface_resolver.rb,
lib/apiwork/export/type_script_mapper.rb
Defined Under Namespace
Classes: Apiwork, ApiworkMapper, Base, OpenAPI, Pipeline, Registry, Sorbus, SorbusMapper, SurfaceResolver, TypeAnalysis, TypeScript, TypeScriptMapper, Zod, ZodMapper
Class Method Summary collapse
-
.find(name) ⇒ Class<Export::Base>?
Finds an export by name.
-
.find!(name) ⇒ Class<Export::Base>
Finds an export by name.
-
.generate(export_name, api_base_path, format: nil, key_format: nil, locale: nil, **options) ⇒ String
Generates an export for an API.
-
.register(klass) ⇒ Object
Registers an export.
- .register_defaults! ⇒ Object
Class Method Details
.find(name) ⇒ Class<Export::Base>?
Finds an export by name.
36 37 38 39 40 41 42 43 |
# File 'lib/apiwork/export.rb', line 36 delegate :clear!, :exists?, :find, :find!, :keys, :register, :values, to: Registry |
.find!(name) ⇒ Class<Export::Base>
Finds an export by name.
36 37 38 39 40 41 42 43 |
# File 'lib/apiwork/export.rb', line 36 delegate :clear!, :exists?, :find, :find!, :keys, :register, :values, to: Registry |
.generate(export_name, api_base_path, format: nil, key_format: nil, locale: nil, **options) ⇒ String
Generates an export for an API.
68 69 70 71 |
# File 'lib/apiwork/export.rb', line 68 def generate(export_name, api_base_path, format: nil, key_format: nil, locale: nil, **) export_class = find!(export_name) export_class.generate(api_base_path, format:, key_format:, locale:, **) end |