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

Two microservices with different endpoint, but same services & similar path #6

Open
hugree opened this issue Jul 25, 2016 · 2 comments

Comments

@hugree
Copy link

hugree commented Jul 25, 2016

I have 11 microservices in my project for the most part your application is working fine.

But one of those microservies is a facade for one of of those other modules.

My configuration is as follows

{
    "docs": "http://${COMMON_CORE_HOST}/core-facade/swagger.json",
    "base_path": "http://${COMMON_CORE_HOST}/core-facade",
    "route_match": ["/facade*"]
}

and

{
    "docs": "http://${MIGRATION_HOST}:${MIGRATION_PORT}/core-migration/swagger.json",
    "base_path": "http://${MIGRATION_HOST}:${MIGRATION_HOST_PORT}/core-migration",
    "route_match": ["/migration*"]
}

URL's are very similar in both services i.e.:
http://{{url}}/core-migration/migration/migrate/
http://{{url}}/core-facade/migration/migrate/

For some reason swagger-combined can't tell the different and only one of the modules is listed in the docs. In my case it's the migration module. When I slightly change the URL for the facade it's working in both modules.

To sum it up... different endpoints... same url schema... only one of the endpoints is recognized by swagger-combined. When I change one character making the paths to be different... everything works fine.

Any tips how to fix that?

@hugree hugree changed the title Two microservices with different path, but same services Two microservices with different endpoint, but same services & similar path Jul 25, 2016
@sandywaves07
Copy link

I do have same issue. We have different version for same service (V1,V2,V3) so URL remain same.
in swagger, we show like v2/api-docs?group=v1 & v2/api-docs?group=v2. Can you let me know how to handle this.
Currently, it show only one url

@thanhson1085
Copy link
Owner

I will think about this issue.

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

No branches or pull requests

3 participants