Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use @generated as defined at https://generated.at #1770

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ components:
<summary>model.py</summary>

```python
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: api.yaml
# timestamp: 2020-06-02T05:28:24+00:00

Expand Down
2 changes: 1 addition & 1 deletion datamodel_code_generator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ def get_header_and_first_line(csv_file: IO[str]) -> Dict[str, Any]:
custom_file_header = custom_file_header_path.read_text(encoding=encoding)

header = """\
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: {}"""
if not disable_timestamp:
header += f'\n# timestamp: {timestamp}'
Expand Down
2 changes: 1 addition & 1 deletion docs/custom_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The generated `person.py` file will now include your custom comment at the top:

**person.py**
```python
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: person.json
# timestamp: 2023-04-09T05:36:24+00:00

Expand Down
4 changes: 2 additions & 2 deletions docs/field-constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Generated Model

`model.py`
```py
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: model.json
# timestamp: 2020-07-20T15:37:56+00:00

Expand Down Expand Up @@ -70,7 +70,7 @@ Generated Model

`model.py`
```py
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: model.json
# timestamp: 2020-07-20T15:47:21+00:00

Expand Down
4 changes: 2 additions & 2 deletions docs/graphql.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type Query {

**model.py**
```python
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: schema.graphql
# timestamp: 2023-11-20T17:04:42+00:00

Expand Down Expand Up @@ -161,7 +161,7 @@ type A {

**model.py**
```python
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: custom-scalar-types.graphql
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ components:
<summary>model.py</summary>

```py
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: api.yaml
# timestamp: 2020-06-02T05:28:24+00:00

Expand Down
2 changes: 1 addition & 1 deletion docs/jsondata.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ $ datamodel-codegen --input pets.json --input-file-type json --output model.py

**model.py**
```py
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: pets.json
# timestamp: 2020-04-27T16:08:21+00:00

Expand Down
2 changes: 1 addition & 1 deletion docs/jsonschema.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ $ datamodel-codegen --input person.json --input-file-type jsonschema --output m

**model.py**
```py
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: person.json
# timestamp: 2020-04-27T16:12:27+00:00

Expand Down
2 changes: 1 addition & 1 deletion docs/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ components:

**model.py**
```py
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: api.yaml
# timestamp: 2020-06-02T05:28:24+00:00

Expand Down
2 changes: 1 addition & 1 deletion docs/using_as_module.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ print(model)

The result of `print(model)`:
```python
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: example.json
# timestamp: 2020-12-21T08:01:06+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/all_of_ref/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: test.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/all_of_with_object/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: all_of_with_object.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/allow_extra_fields/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: api.yaml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: api.yaml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: api.yaml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: api.yaml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/combined_array/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: combined_array.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/csv_file_simple/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: simple.csv
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/csv_stdin_simple/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: <stdin>
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/disable_timestamp/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: api.yaml

from __future__ import annotations
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: common.yml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: test.yml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: common.yml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: test.yml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: common.yml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: test.yml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: api.yaml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: api.yaml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/enable_version_header/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: api.yaml
# timestamp: 2019-07-26T00:00:00+00:00
# version: 0.0.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: model_b
# timestamp: 2019-07-26T00:00:00+00:00
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: module.openapi.yaml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: model_b
# timestamp: 2019-07-26T00:00:00+00:00
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: module.openapi.yaml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/force_optional/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: api.yaml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/has_default_value/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: has_default_value.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/main/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: api.yaml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/main_all_of_any_of/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: all_of_any_of
# timestamp: 2019-07-26T00:00:00+00:00
2 changes: 1 addition & 1 deletion tests/data/expected/main/main_all_of_any_of/direct.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: direct.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/main_all_of_any_of/reference.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: reference.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/main_all_of_one_of/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: all_of_one_of
# timestamp: 2019-07-26T00:00:00+00:00
2 changes: 1 addition & 1 deletion tests/data/expected/main/main_all_of_one_of/direct.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: direct.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/main_all_of_one_of/reference.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: reference.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/main_all_of_ref_self/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: all_of_ref_self.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/main_all_of_use_default/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: all_of_default.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: openapi.yaml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: array_field_constraints.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/main_autodetect/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: person.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/main_base_class/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: api.yaml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/main_circular_reference/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: circular_reference.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: not_real_string.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: not_real_string.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: flat_type.jsonschema
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: complicated_enum.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: complicated_enum.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: api.yaml
# timestamp: 1985-10-26T08:21:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/main_dataclass/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: api.yaml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: api.yaml
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
2 changes: 1 addition & 1 deletion tests/data/expected/main/main_dataclass_field/output.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: user.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# generated by datamodel-codegen:
# @generated by datamodel-codegen:
# filename: user_default.json
# timestamp: 2019-07-26T00:00:00+00:00

Expand Down
Loading
Loading