Skip to content

service id out-of-sync since it is located two places #402

@GavinChenYan

Description

@GavinChenYan

When we generate API based on API specification and config.json, there are two places have service Id definition:

Server.yml:
serviceId: ${server.serviceId:com.networknt.marketsample-service-3.0.1}

And handler.yml (for health check):

  • path: '/health/com.networknt.marketsample-service-3.0.1'
    method: 'get'
    exec:
    • health

This could cause trouble if user change the service id in values.yml file or config server.
user may forget to change it from handler.yml. Then at the service deployment, consul will de-register the service since the health check failure.
Even user changed the handler.yml, the maven build use the codegen plugin may override the change and replace it with the default value.

I think we should change the codegen to use the injection token for service id in the handler.yml file. We need verify if this works or not.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions