Skip to content

Commit 70909ca

Browse files
committed
fix(datamodels): fix names of v31 Schema object fields
1 parent bf58d49 commit 70909ca

File tree

2 files changed

+9
-9
lines changed
  • packages/jentic-openapi-datamodels

2 files changed

+9
-9
lines changed

packages/jentic-openapi-datamodels/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,9 @@ Special cases for Python reserved keywords and `$` fields:
276276
- `then``then_`
277277
- `else``else_`
278278
- `not``not_`
279-
- `$ref``ref_`
280-
- `$id``id_`
281-
- `$schema``schema_`
279+
- `$ref``ref`
280+
- `$id``id`
281+
- `$schema``schema`
282282

283283
### Source Tracking
284284

packages/jentic-openapi-datamodels/src/jentic/apitools/openapi/datamodels/low/v31/schema.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ class Schema:
4646
root_node: The top-level node representing the entire Schema object in the original source file
4747
4848
# JSON Schema Core Keywords (2020-12)
49-
schema_: The $schema keyword - URI of the meta-schema
50-
id_: The $id keyword - URI that identifies the schema resource
51-
ref_: The $ref keyword - URI reference to another schema
49+
schema: The $schema keyword - URI of the meta-schema
50+
id: The $id keyword - URI that identifies the schema resource
51+
ref: The $ref keyword - URI reference to another schema
5252
anchor: The $anchor keyword - Plain name fragment for identification
5353
dynamic_ref: The $dynamicRef keyword - Dynamic reference to another schema
5454
dynamic_anchor: The $dynamicAnchor keyword - Dynamic anchor for identification
@@ -146,9 +146,9 @@ class Schema:
146146
root_node: yaml.Node
147147

148148
# Core Keywords
149-
id_: FieldSource[str] | None = fixed_field(metadata={"yaml_name": "$id"})
150-
schema_: FieldSource[str] | None = fixed_field(metadata={"yaml_name": "$schema"})
151-
ref_: FieldSource[str] | None = fixed_field(metadata={"yaml_name": "$ref"})
149+
id: FieldSource[str] | None = fixed_field(metadata={"yaml_name": "$id"})
150+
schema: FieldSource[str] | None = fixed_field(metadata={"yaml_name": "$schema"})
151+
ref: FieldSource[str] | None = fixed_field(metadata={"yaml_name": "$ref"})
152152
comment: FieldSource[str] | None = fixed_field(metadata={"yaml_name": "$comment"})
153153
defs: FieldSource[dict[KeySource[str], NestedSchema]] | None = fixed_field(
154154
metadata={"yaml_name": "$defs"}

0 commit comments

Comments
 (0)