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

No documetation on how to merge API specs #714

Closed
ollyde opened this issue Dec 28, 2023 · 0 comments · Fixed by #716
Closed

No documetation on how to merge API specs #714

ollyde opened this issue Dec 28, 2023 · 0 comments · Fixed by #716
Labels
enhancement New feature or request

Comments

@ollyde
Copy link

ollyde commented Dec 28, 2023

I have two API services.

They both have OpenAPI automatic documentation.

I looked at https://github.com/poem-web/poem/blob/master/examples/openapi/combined-apis/src/main.rs

But it doesn't answer a simple question.

If we have two services, how do I merge the spec so it's on /panel page?

    let api_service =
        OpenApiService::new((AuthApi, TestApi), "Test API", version).server(api_doc_url_info);

    // What do I call here                     <--------
    let ui = api_service.swagger_ui();

    let app = Route::new()
        .at("/status", get(server_status))
        .nest("/api/auth", get_auth_api())
        .nest("/api/test", get_test_api())
        .nest("/panel", ui);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant