Skip to content

Commit f1f5e10

Browse files
authored
Merge pull request #7 from mike-oakley/u/mike/readme-update
Update README.md
2 parents 0571ffe + 7fc5cab commit f1f5e10

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
# openapi-schema-pydantic
1+
# openapi-pydantic
22

3-
[![PyPI](https://img.shields.io/pypi/v/openapi-schema-pydantic)](https://pypi.org/project/openapi-schema-pydantic/)
4-
[![PyPI - License](https://img.shields.io/pypi/l/openapi-schema-pydantic)](https://github.com/kuimono/openapi-schema-pydantic/blob/master/LICENSE)
3+
[![PyPI](https://img.shields.io/pypi/v/openapi-pydantic)](https://pypi.org/project/openapi-schema-pydantic/)
4+
[![PyPI - License](https://img.shields.io/pypi/l/openapi-pydantic)](https://github.com/mike-oakley/openapi-pydantic/blob/main/LICENSE)
55

6-
OpenAPI (v3) specification schema as [Pydantic](https://github.com/samuelcolvin/pydantic) classes.
6+
OpenAPI schema implemented in [Pydantic](https://github.com/samuelcolvin/pydantic).
77

88
The naming of the classes follows the schema in
99
[OpenAPI specification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#schema).
1010

1111
## Installation
1212

13-
`pip install openapi-schema-pydantic`
13+
`pip install openapi-pydantic`
1414

1515
## Try me
1616

1717
```python
18-
from openapi_schema_pydantic import OpenAPI, Info, PathItem, Operation, Response
18+
from openapi_pydantic import OpenAPI, Info, PathItem, Operation, Response
1919

2020
# Construct OpenAPI by pydantic objects
2121
open_api = OpenAPI(
@@ -74,7 +74,7 @@ Pydantic is a great tool, allow you to use object / dict / mixed data for for in
7474
The following examples give the same OpenAPI result as above:
7575

7676
```python
77-
from openapi_schema_pydantic import OpenAPI, PathItem, Response
77+
from openapi_pydantic import OpenAPI, PathItem, Response
7878

7979
# Construct OpenAPI from dict
8080
open_api = OpenAPI.parse_obj({
@@ -112,8 +112,8 @@ The approach to deal with this:
112112
```python
113113
from pydantic import BaseModel, Field
114114

115-
from openapi_schema_pydantic import OpenAPI
116-
from openapi_schema_pydantic.util import PydanticSchema, construct_open_api_with_schema_class
115+
from openapi_pydantic import OpenAPI
116+
from openapi_pydantic.util import PydanticSchema, construct_open_api_with_schema_class
117117

118118
def construct_base_open_api() -> OpenAPI:
119119
return OpenAPI.parse_obj({
@@ -264,8 +264,8 @@ More info about field alias:
264264

265265
| OpenAPI version | Field alias info |
266266
| --------------- | ---------------- |
267-
| 3.1.0 | [here](https://github.com/kuimono/openapi-schema-pydantic/blob/master/openapi_schema_pydantic/v3/v3_1_0/README.md#alias) |
268-
| 3.0.3 | [here](https://github.com/kuimono/openapi-schema-pydantic/blob/master/openapi_schema_pydantic/v3/v3_0_3/README.md#alias) |
267+
| 3.1.0 | [here](https://github.com/mike-oakley/openapi-pydantic/blob/main/openapi_pydantic/v3/v3_1_0/README.md#alias) |
268+
| 3.0.3 | [here](https://github.com/mike-oakley/openapi-pydantic/blob/main/openapi_pydantic/v3/v3_0_3/README.md#alias) |
269269

270270
### Non-pydantic schema types
271271

@@ -274,19 +274,19 @@ Please refer to the following for more info:
274274

275275
| OpenAPI version | Non-pydantic schema type info |
276276
| --------------- | ----------------------------- |
277-
| 3.1.0 | [here](https://github.com/kuimono/openapi-schema-pydantic/blob/master/openapi_schema_pydantic/v3/v3_1_0/README.md#non-pydantic-schema-types) |
278-
| 3.0.3 | [here](https://github.com/kuimono/openapi-schema-pydantic/blob/master/openapi_schema_pydantic/v3/v3_0_3/README.md#non-pydantic-schema-types) |
277+
| 3.1.0 | [here](https://github.com/mike-oakley/openapi-pydantic/blob/main/openapi_pydantic/v3/v3_1_0/README.md#non-pydantic-schema-types) |
278+
| 3.0.3 | [here](https://github.com/mike-oakley/openapi-pydantic/blob/main/openapi_pydantic/v3/v3_0_3/README.md#non-pydantic-schema-types) |
279279

280280
### Use OpenAPI 3.0.3 instead of 3.1.0
281281

282282
Some UI renderings (e.g. Swagger) still do not support OpenAPI 3.1.0.
283283
It is allowed to use the old 3.0.3 version by importing from different paths:
284284

285285
```python
286-
from openapi_schema_pydantic.v3.v3_0_3 import OpenAPI, ...
287-
from openapi_schema_pydantic.v3.v3_0_3.util import PydanticSchema, construct_open_api_with_schema_class
286+
from openapi_pydantic.v3.v3_0_3 import OpenAPI, ...
287+
from openapi_pydantic.v3.v3_0_3.util import PydanticSchema, construct_open_api_with_schema_class
288288
```
289289

290290
## License
291291

292-
[MIT License](https://github.com/kuimono/openapi-schema-pydantic/blob/master/LICENSE)
292+
[MIT License](https://github.com/mike-oakley/openapi-pydantic/blob/main/LICENSE)

0 commit comments

Comments
 (0)