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

Allow optional prefix in generated spec #473

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

VersBinarii
Copy link
Contributor

This PR addresses this issue.

@sunli829 please review and let me know if this is ok with you

@VersBinarii VersBinarii marked this pull request as ready for review January 3, 2023 13:37
@VersBinarii VersBinarii marked this pull request as draft January 3, 2023 13:52
@VersBinarii VersBinarii marked this pull request as ready for review January 3, 2023 14:52
@VersBinarii
Copy link
Contributor Author

The tests are failing because some rate limits while installing protoc

@VersBinarii
Copy link
Contributor Author

@sunli829 if you're happy with the approach i could add the options to the swagger_ui and rapidoc functions as well.

@sunli829
Copy link
Collaborator

sunli829 commented Jan 14, 2023

Maybe it's better to do this so that we don't need to change spec, swagger_ui, rapidoc, etc. methods?

 let api_service = OpenApiService::new(TodosApi, "Todos", "1.0.0")
                              .server("http://localhost:3000")
                              .url_prefix("/foo/bar"); // specified url prefix

@VersBinarii
Copy link
Contributor Author

Very well, that seems cleaner. Let me have a look at it then

@VersBinarii
Copy link
Contributor Author

Hello @sunli829 , i've updated it as per your suggestion.

@sunli829
Copy link
Collaborator

Thanks! 🙂

@sunli829 sunli829 merged commit fc7433c into poem-web:master Jan 19, 2023
@VersBinarii VersBinarii deleted the spec_option branch January 24, 2023 11:29
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