mirror of
https://github.com/koxudaxi/datamodel-code-generator.git
synced 2024-03-18 14:54:37 +03:00
Change master to main (#1681)
* Change master to main * Change master to main
This commit is contained in:
4
.github/workflows/codeql.yml
vendored
4
.github/workflows/codeql.yml
vendored
@@ -2,9 +2,9 @@ name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
branches: [ "main" ]
|
||||
schedule:
|
||||
- cron: "26 1 * * 4"
|
||||
|
||||
|
||||
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
@@ -3,7 +3,7 @@ name: Docs
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-deploy:
|
||||
|
||||
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
||||
poetry install
|
||||
poetry build
|
||||
- name: Publish package
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.pypi_password }}
|
||||
|
||||
@@ -6,7 +6,7 @@ This code generator creates [pydantic v1 and v2](https://docs.pydantic.dev/) mod
|
||||
[](https://anaconda.org/conda-forge/datamodel-code-generator)
|
||||
[](https://pepy.tech/project/datamodel-code-generator)
|
||||
[](https://pypi.python.org/pypi/datamodel-code-generator)
|
||||
[](https://codecov.io/gh/koxudaxi/datamodel-code-generator)
|
||||
[](https://codecov.io/gh/koxudaxi/datamodel-code-generator)
|
||||

|
||||
[](https://github.com/psf/black)
|
||||
|
||||
@@ -264,7 +264,7 @@ These OSS projects use datamodel-code-generator to generate many models. See the
|
||||
- *[generate-types.sh](https://github.com/SeldonIO/MLServer/blob/master/hack/generate-types.sh)*
|
||||
|
||||
## Supported input types
|
||||
- OpenAPI 3 (YAML/JSON, [OpenAPI Data Type](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#data-types))
|
||||
- OpenAPI 3 (YAML/JSON, [OpenAPI Data Type](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#data-types))
|
||||
- JSON Schema ([JSON Schema Core](http://json-schema.org/draft/2019-09/json-schema-validation.html)/[JSON Schema Validation](http://json-schema.org/draft/2019-09/json-schema-validation.html))
|
||||
- JSON/YAML/CSV Data (it will be converted to JSON Schema)
|
||||
- Python dictionary (it will be converted to JSON Schema)
|
||||
|
||||
@@ -57,4 +57,4 @@ class Model(BaseModel):
|
||||
|
||||
```
|
||||
|
||||
In this example, we kept it simple, but you can create more complex custom templates by copying [the default templates](https://github.com/koxudaxi/datamodel-code-generator/tree/master/datamodel_code_generator/model/template) Use [the default templates](https://github.com/koxudaxi/datamodel-code-generator/tree/master/datamodel_code_generator/model/template) as a reference for understanding the structure and available variables, and customize the code generation process according to your specific requirements.
|
||||
In this example, we kept it simple, but you can create more complex custom templates by copying [the default templates](https://github.com/koxudaxi/datamodel-code-generator/tree/main/datamodel_code_generator/model/template) Use [the default templates](https://github.com/koxudaxi/datamodel-code-generator/tree/main/datamodel_code_generator/model/template) as a reference for understanding the structure and available variables, and customize the code generation process according to your specific requirements.
|
||||
|
||||
@@ -7,7 +7,7 @@ This code generator creates [pydantic v1 and v2](https://docs.pydantic.dev/) mod
|
||||
[](https://anaconda.org/conda-forge/datamodel-code-generator)
|
||||
[](https://pepy.tech/project/datamodel-code-generator)
|
||||
[](https://pypi.python.org/pypi/datamodel-code-generator)
|
||||
[](https://codecov.io/gh/koxudaxi/datamodel-code-generator)
|
||||
[](https://codecov.io/gh/koxudaxi/datamodel-code-generator)
|
||||

|
||||
[](https://github.com/psf/black)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user