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

[WIP] Add OpenAPI v3.0/v3.1 parser #826

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

IArtNextI
Copy link


Note: by creating a PR or an issue you automatically agree to the CLA. See CONTRIBUTING.md. Feel free to remove this note, the agreement holds.

@IArtNextI IArtNextI changed the title Add OpenAPI parser Add OpenAPI v3.0/v3.1 parser Jan 12, 2025
@IArtNextI IArtNextI changed the title Add OpenAPI v3.0/v3.1 parser [WIP] Add OpenAPI v3.0/v3.1 parser Jan 12, 2025
# Unless this gets fixed, we need to have two implementations :(
import sys

if sys.version_info >= (3, 11):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

давай все делать для старого питона
не нужно спец кейзов для нового питона

from pydantic import BaseModel, ConfigDict


class XML(BaseModel):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xml в бекенде мы не будем поддерживать, по крайней мере на первом этапе
можно сделать поддержку в фронте, если это не трудно, но пользователей у нее вначале не будет AFAICS

@@ -0,0 +1,3468 @@
# OpenAPI Specification
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тащить саму спецификацию к нам не нужно
можно дать ссылку на гитхаб с этими файлами

from ..utils import get_content_type
from .errors import ErrorLevel, ParseError

if sys.version_info >= (3, 11):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

без развилики, только для старой версии

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants