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

Update specs public API #1799

Open
wants to merge 18 commits into
base: 0.6.0
Choose a base branch
from
Open

Conversation

KrySeyt
Copy link
Contributor

@KrySeyt KrySeyt commented Sep 16, 2024

Description

Please include a summary of the change and specify which issue is being addressed. Additionally, provide relevant motivation and context.

Fixes # (issue number)

Type of change

Please delete options that are not relevant.

  • Documentation (typos, code examples, or any documentation updates)
  • Bug fix (a non-breaking change that resolves an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a fix or feature that would disrupt existing functionality)
  • This change requires a documentation update

Checklist

  • My code adheres to the style guidelines of this project (scripts/lint.sh shows no errors)
  • I have conducted a self-review of my own code
  • I have made the necessary changes to the documentation
  • My changes do not generate any new warnings
  • I have added tests to validate the effectiveness of my fix or the functionality of my new feature
  • Both new and existing unit tests pass successfully on my local environment by running scripts/test-cov.sh
  • I have ensured that static analysis tests are passing by running scripts/static-analysis.sh
  • I have included code examples to illustrate the modifications

@KrySeyt KrySeyt changed the title init Update specs public API Sep 16, 2024
@KrySeyt KrySeyt marked this pull request as ready for review September 18, 2024 19:30
@@ -188,15 +195,15 @@ def _parse_and_serve(

else:
raise ValueError(
f"Unknown extension given - {app}; Please provide app in format [python_module:FastStream] or [asyncapi.yaml/.json] - path to your application or documentation"
f"Unknown extension given - {docs}; Please provide app in format [python_module:AsyncAPIProto] or [asyncapi.yaml/.json] - path to your application or documentation"
)

for schema in (SchemaV3, SchemaV2_6):
Copy link
Member

Choose a reason for hiding this comment

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

I think, we can use inheritance here like Docs.parse() isntead of iteration



def get_app_schema(app: Application) -> Schema:
def get_app_schema(
Copy link
Member

Choose a reason for hiding this comment

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

Why it requires options instead of Schema object?

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