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:
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.
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):
method: 'get'
exec:
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.