Where should we keep mapping between end points in microservices?

5/22/2020

I have one exposed rest endpoint where I am accepting values and mapping it to call another endpoint. for one field I have possible values in exposed endpoint as enum-

  • AA
  • BB
  • CC

another endpoint which I want to call, enum for the field is

id value

1 AAA

2 BBB

3 CCC

AA will be mapped to id 1 and so on. When I am calling another endpoint I should know mapping relation between these two.

I can put this mapping in the config-map. But I want to know is it the best way or there is any other and better way to keep this mapping.

-- ritika
configmap
java
kubernetes
microservices
properties

0 Answers