-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathschema_codegen.yaml
More file actions
54 lines (54 loc) · 1.37 KB
/
Copy pathschema_codegen.yaml
File metadata and controls
54 lines (54 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Declarative JSON Schema -> Python model generation targets.
---
defaults:
generator:
input_file_type: jsonschema
output_model_type: pydantic_v2.BaseModel
target_python_version: "3.14"
use_annotated: true
use_union_operator: true
use_standard_collections: true
use_exact_imports: true
field_constraints: true
snake_case_field: true
capitalise_enum_members: true
use_schema_description: true
use_field_description: true
formatters:
- ruff-format
- ruff-check
sources:
codegen-manifest-schemas:
kind: directory
path: schemas/codegen
include:
- "*.json"
format: json
# Nix's vendored JSON schemas are intentionally generated through
# nixcfg schema codegen / lib.nix.schemas._codegen; keep this declarative
# config focused on the schema_codegen models.
registry_profiles:
local-relative:
resource:
mode: from-contents
aliases:
- relative-path
- basename
- internal-id
registry:
crawl: true
retrieve:
kind: none
targets:
codegen-manifest-models:
sources:
- codegen-manifest-schemas
registry_profile: local-relative
entrypoints:
- ./codegen.schema.json
- ./codegen-lock.schema.json
prepare:
dereference: inline-refs
merge_ref_siblings: false
generator:
output: lib/schema_codegen/models/_generated.py