Created
September 5, 2023 12:51
-
-
Save orisano/99925f79abd463b6c73687710de580d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/schema", | |
"type": "object", | |
"required": [ | |
"version" | |
], | |
"properties": { | |
"version": { | |
"const": "2" | |
}, | |
"project": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string" | |
} | |
} | |
}, | |
"cloud": { | |
"type": "object", | |
"properties": { | |
"organization": { | |
"type": "string" | |
}, | |
"project": { | |
"type": "string" | |
}, | |
"hostname": { | |
"type": "string" | |
} | |
} | |
}, | |
"sql": { | |
"type": "array", | |
"minItems": 1, | |
"items": { | |
"type": "object", | |
"required": [ | |
"engine" | |
], | |
"properties": { | |
"engine": { | |
"enum": [ | |
"postgresql", | |
"mysql", | |
"sqlite" | |
] | |
}, | |
"schema": { | |
"oneOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
] | |
}, | |
"queries": { | |
"oneOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
] | |
}, | |
"database": { | |
"type": "object", | |
"properties": { | |
"uri": { | |
"type": "string" | |
} | |
} | |
}, | |
"strict_function_checks": { | |
"type": "boolean" | |
}, | |
"strict_order_by": { | |
"type": "boolean" | |
}, | |
"gen": { | |
"type": "object", | |
"properties": { | |
"go": { | |
"type": "object", | |
"properties": { | |
"emit_interface": { | |
"type": "boolean" | |
}, | |
"emit_json_tags": { | |
"type": "boolean" | |
}, | |
"json_tags_id_uppercase": { | |
"type": "boolean" | |
}, | |
"emit_db_tags": { | |
"type": "boolean" | |
}, | |
"emit_prepared_queries": { | |
"type": "boolean" | |
}, | |
"emit_exact_table_names": { | |
"type": "boolean" | |
}, | |
"emit_empty_slices": { | |
"type": "boolean" | |
}, | |
"emit_exported_queries": { | |
"type": "boolean" | |
}, | |
"emit_result_struct_pointers": { | |
"type": "boolean" | |
}, | |
"emit_params_struct_pointers": { | |
"type": "boolean" | |
}, | |
"emit_methods_with_db_argument": { | |
"type": "boolean" | |
}, | |
"emit_pointers_for_null_types": { | |
"type": "boolean" | |
}, | |
"emit_enum_valid_method": { | |
"type": "boolean" | |
}, | |
"emit_all_enum_values": { | |
"type": "boolean" | |
}, | |
"json_tags_case_style": { | |
"type": "string" | |
}, | |
"package": { | |
"type": "string" | |
}, | |
"out": { | |
"type": "string" | |
}, | |
"overrides": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"go_type": { | |
"oneOf": [ | |
{ | |
"type": "object", | |
"properties": { | |
"import": { | |
"type": "string" | |
}, | |
"package": { | |
"type": "string" | |
}, | |
"type": { | |
"type": "string" | |
}, | |
"pointer": { | |
"type": "boolean" | |
}, | |
"slice": { | |
"type": "boolean" | |
}, | |
"spec": { | |
"type": "string" | |
}, | |
"builtin": { | |
"type": "boolean" | |
} | |
}, | |
}, | |
{ | |
"type": "string" | |
} | |
] | |
}, | |
"go_struct_tag": { | |
"type": "string" | |
}, | |
"db_type": { | |
"type": "string" | |
}, | |
"engine": { | |
"enum": [ | |
"postgresql", | |
"mysql", | |
"sqlite" | |
] | |
}, | |
"nullable": { | |
"type": "boolean" | |
}, | |
"unsigned": { | |
"type": "boolean" | |
}, | |
"column": { | |
"type": "string" | |
} | |
}, | |
}, | |
}, | |
}, | |
"rename": { | |
"type": "object", | |
"patternProperties": { | |
".*": { | |
"type": "string" | |
} | |
} | |
}, | |
"sql_package": { | |
"type": "string" | |
}, | |
"sql_driver": { | |
"type": "string" | |
}, | |
"output_batch_file_name": { | |
"type": "string" | |
}, | |
"output_db_file_name": { | |
"type": "string" | |
}, | |
"output_models_file_name": { | |
"type": "string" | |
}, | |
"output_querier_file_name": { | |
"type": "string" | |
}, | |
"output_files_suffix": { | |
"type": "string" | |
}, | |
"inflection_exclude_table_names": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"query_parameter_limit": { | |
"type": "integer" | |
}, | |
"omit_unused_structs": { | |
"type": "boolean" | |
} | |
}, | |
"json": { | |
"type": "object", | |
"properties": { | |
"out": { | |
"type": "string" | |
}, | |
"indent": { | |
"type": "string" | |
}, | |
"filename": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"codegen": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"out": { | |
"type": "string" | |
}, | |
"plugin": { | |
"type": "string" | |
}, | |
"options": { | |
"type": "object" | |
} | |
} | |
} | |
}, | |
"rules": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
}, | |
"overrides": { | |
"type": "object", | |
"properties": { | |
"go": { | |
"type": "object", | |
"properties": { | |
"overrides": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"go_type": { | |
"oneOf": [ | |
{ | |
"type": "object", | |
"properties": { | |
"import": { | |
"type": "string" | |
}, | |
"package": { | |
"type": "string" | |
}, | |
"type": { | |
"type": "string" | |
}, | |
"pointer": { | |
"type": "boolean" | |
}, | |
"slice": { | |
"type": "boolean" | |
}, | |
"spec": { | |
"type": "string" | |
}, | |
"builtin": { | |
"type": "boolean" | |
} | |
}, | |
}, | |
{ | |
"type": "string" | |
} | |
] | |
}, | |
"go_struct_tag": { | |
"type": "string" | |
}, | |
"db_type": { | |
"type": "string" | |
}, | |
"engine": { | |
"enum": [ | |
"postgresql", | |
"mysql", | |
"sqlite" | |
] | |
}, | |
"nullable": { | |
"type": "boolean" | |
}, | |
"unsigned": { | |
"type": "boolean" | |
}, | |
"column": { | |
"type": "string" | |
} | |
}, | |
}, | |
}, | |
"rename": { | |
"type": "object", | |
"patternProperties": { | |
".*": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"plugins": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"required": [ | |
"name" | |
], | |
"properties": { | |
"name": { | |
"type": "string", | |
"minLength": 1 | |
}, | |
"env": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"process": { | |
"type": "object", | |
"properties": { | |
"cmd": { | |
"type": "string" | |
} | |
} | |
}, | |
"wasm": { | |
"type": "object", | |
"properties": { | |
"url": { | |
"type": "string" | |
}, | |
"sha256": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"rules": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"rule": { | |
"type": "string" | |
}, | |
"message": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment