Skip to content

Commit 9a76caf

Browse files
authored
add few small fixes. (#21)
1 parent 4a1300f commit 9a76caf

14 files changed

Lines changed: 8 additions & 1021 deletions

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## Version 0.14.1
2+
3+
* Add few small fixes.
4+
15
## Version 0.14.0
26

37
* Add security object schemes.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ license-files = ["LICENSE.txt"]
2020
name = "Schema-First"
2121
readme = "README.md"
2222
requires-python = ">=3.13"
23-
version = "0.14.0"
23+
version = "0.14.1"
2424

2525
[project.optional-dependencies]
2626
dev = [

src/schema_first/openapi/schemas/fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from marshmallow import validate
33

44
ENDPOINT_FIELD = fields.String(
5-
required=True, validate=validate.Regexp(r'^[/][0-9a-zA-Z-_{}/?.]*[^/]$')
5+
required=True, validate=validate.Regexp(r'^/[.a-zA-Z0-9/{}_-]*[?]{0,1}[a-zA-Z0-9/=&_-]*$')
66
)
77
HTTP_CODE_FIELD = fields.String(required=True, validate=validate.Regexp(r'^[1-5]{1}\d{2}|default$'))
88
SUMMARY_FIELD = fields.String(validate=validate.Length(min=1, max=150))
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
from marshmallow import fields
22

33
from ..base import BaseSchema
4-
from .example_object_schema import ExampleObjectSchema
54
from .schema_object_schema import SchemaObjectSchema
65

76

87
class MediaTypeObjectSchema(BaseSchema):
98
schema = fields.Nested(SchemaObjectSchema)
109
itemSchema = fields.Nested(SchemaObjectSchema)
11-
examples = fields.Dict(keys=fields.String(), values=fields.Nested(ExampleObjectSchema))
10+
examples = fields.Dict(keys=fields.String(), values=fields.Raw())

tests/_contrib/specs/v3.0/api-with-examples.yaml

Lines changed: 0 additions & 43 deletions
This file was deleted.

tests/_contrib/specs/v3.0/callback-example.yaml

Lines changed: 0 additions & 62 deletions
This file was deleted.

tests/_contrib/specs/v3.0/link-example.yaml

Lines changed: 0 additions & 203 deletions
This file was deleted.

0 commit comments

Comments
 (0)