Class: Textus::Action::SchemaEnvelope
- Defined in:
- lib/textus/action/schema_envelope.rb
Class Method Summary collapse
Methods inherited from Base
Methods included from Contract::DSL
#arg, #cli, #cli_stdin, #contract, #contract?, #summary, #surfaces, #verb, #view
Class Method Details
.call(container:, key:) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/textus/action/schema_envelope.rb', line 13 def self.call(container:, key:, **) manifest = container.manifest schemas = container.schemas mentry = manifest.resolver.resolve(key).entry schema = schemas.fetch_or_nil(mentry.schema) Success({ "protocol" => Textus::PROTOCOL, "key" => key, "schema_ref" => mentry.schema, "schema" => schema&.to_h }) end |