8000 feat: Add AsyncAPI HTTP Support by tmulligan98 · Pull Request #2142 · ag2ai/faststream · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Add AsyncAPI HTTP Support #2142

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

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

tmulligan98
Copy link
@tmulligan98 tmulligan98 commented Mar 23, 2025

Description

Add support for an include_in_schema parameter to register HTTP routes in the app schema

TODO: Should include_in_schema be True by default?

Fixes #2091

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

@tmulligan98 tmulligan98 changed the title feat: Added AsyncAPI HTTP Support feat: WIP Add AsyncAPI HTTP Support Mar 23, 2025
@tmulligan98 tmulligan98 changed the title feat: WIP Add AsyncAPI HTTP Support feat: Add AsyncAPI HTTP Support Mar 31, 2025
@tmulligan98 tmulligan98 marked this pull request as ready for review March 31, 2025 20:42
@tmulligan98
Copy link
Author

Hi @Lancetnik can you review please?

@CLAassistant
Copy link
CLAassistant commented Apr 1, 2025

CLA assistant check
All committers have signed the CLA.

@Lancetnik
Copy link
Collaborator

@tmulligan98 sorry, missed this one! I definitely check check soon
Can you please sign CLA for now?

@tmulligan98
Copy link
Author

@tmulligan98 sorry, missed this one! I definitely check check soon Can you please sign CLA for now?

Done 😃

Copy link
Collaborator
@Lancetnik Lancetnik left a comment

Choose a reason for hiding this comment

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

Sorry for waiting so long
Great job! Really appreciate the help. But, I think, we should make some more extensive changes – migrate ASGI functions to classes to incapsulate some logic to them and make them able to store metainforamation

Also, we should polish the types to remove all mypy ignores (if it is possilbe)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please, remove this file changes

@Lancetnik
Copy link
Collaborator

Some other TODO items:

  • More unit tests required?

Not sure. Looks enough for me.

for route in app.routes:
path, asgi_app = route

if asgi_app.include_in_schema:
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should check is this object a GetHandler instance. User could be able to add own ASGI handler to router

@Lancetnik
Copy link
Collaborator

Well, thank you! I think, it is good enough. I want to polish some things by myself and then we can merge the PR

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.

Feature: AsyncAPI HTTP support
3 participants
0