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

Feature Request: Optional Support for Rocket-Okapi Integration in IntrospectedUser #558

Closed
NewtTheWolf opened this issue Jun 9, 2024 · 8 comments

Comments

@NewtTheWolf
Copy link
Contributor

Feature Request: Optional Support for Rocket-Okapi Integration in IntrospectedUser

Description

I propose integrating the rocket-okapi library as an optional feature in the zitadel-rust project, specifically by implementing the OpenApiResponderInner and/or OpenApiResponder traits in the IntrospectedUser type. This enhancement would enable OpenAPI specification support for Rocket-based applications, facilitating automated API documentation generation.

Motivation

Adding rocket-okapi support as an optional feature would improve the developer experience by providing automated API documentation generation capabilities, without imposing additional overhead on those who do not require this functionality. It is particularly useful for teams that need to maintain clear and accurate API documentation in fast-paced development environments.

Suggestion

The feature should be implemented as non-default, allowing developers to opt in as needed. Implementing the required traits in IntrospectedUser would make it straightforward to generate API documentation for services that utilize this type.

Possible Implementation Steps:

  1. Modify the IntrospectedUser type to implement the OpenApiResponderInner and OpenApiResponder traits.
  2. Implement the integration as a feature flag within the zitadel-rust project to keep it optional.
  3. Create detailed examples and documentation to guide developers on how to enable and use the new feature.
  4. Conduct comprehensive testing to ensure that enabling this feature does not affect the existing functionalities negatively.

Conclusion

Integrating rocket-okapi as an optional feature within IntrospectedUser could greatly enhance the capability of developers to maintain robust API documentation with minimal overhead. This feature would be particularly advantageous for projects requiring detailed and accurate API specs without disrupting the current project setup. I am eager to hear your thoughts and suggestions regarding this proposal.

Thank you for considering this feature request.

rocket-okapi GitHub Link

@NewtTheWolf
Copy link
Contributor Author

i would try to implement it, atm i am struggling to develop the project

but i could test the new features of course!

@pustekuchen91
Copy link

Hello @NewtTheWolf,

thanks for implementing this. I am also interested in this feature.

@buehler Can I somehow support this to appear in the next zitadel version?

@NewtTheWolf
Copy link
Contributor Author

NewtTheWolf commented Jul 3, 2024

Uh, someone is intrested, atm i am using a Tuplestruct to Achive it

But i will implement it correctly later that day in my Draft Pull so it could be Merged

@NewtTheWolf
Copy link
Contributor Author

@pustekuchen91 do you have an idea by any chance?

#559 (comment)

@buehler
Copy link
Collaborator

buehler commented Jul 4, 2024

Hey @pustekuchen91 @NewtTheWolf

Thanks for the proposals. This sounds reasonable :-)

I currently have no time to implement such a thing, but feel free to create a PR which I'll happily review ;-)

@NewtTheWolf
Copy link
Contributor Author

hey @buehler i already implemented it in the linked PR

could you maybe already do a little review?
more to check if everything is okey and the little problem i mentioned in my comment about the URL

@FrTerstappen
Copy link
Contributor

Hello @buehler and @NewtTheWolf ,

I am also interested in this feature. Is there some way to support this effort?
I am currently using the changes made by @NewtTheWolf. And while they are not perfect they are going in the right direction. I have left some feedback in the draft for this change.

@buehler
Copy link
Collaborator

buehler commented Sep 26, 2024

Implemented with #559

@buehler buehler closed this as completed Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants