module OasRails::Builders::EsquemaBuilder
def build_incoming_schema(klass:, model_to_schema_class: Esquema)
-
(Hash)
- The schema as a JSON-compatible hash.
Parameters:
-
klass
(Class
) -- The class for which the schema is built.
def build_incoming_schema(klass:, model_to_schema_class: Esquema) configure_common_settings model_to_schema_class.configuration.excluded_columns = OasRails.config.excluded_columns_incoming model_to_schema_class::Builder.new(klass).build_schema.as_json end
def build_outgoing_schema(klass:, model_to_schema_class: Esquema)
-
(Hash)
- The schema as a JSON-compatible hash.
Parameters:
-
klass
(Class
) -- The class for which the schema is built.
def build_outgoing_schema(klass:, model_to_schema_class: Esquema) configure_common_settings model_to_schema_class.configuration.excluded_columns = OasRails.config.excluded_columns_outgoing model_to_schema_class::Builder.new(klass).build_schema.as_json end
def configure_common_settings
Configures common settings for schema building.
def configure_common_settings Esquema.configuration.exclude_associations = true Esquema.configuration.exclude_foreign_keys = true end