Microservice Examples
This page showcases a simplified example of a microservice focused on core concepts.
The data model is represented using a simple JSON object.
Microservice 1: Input Validation
This example demonstrates basic input validation. The server receives a JSON payload.
The request object includes a field 'message' and an optional 'data'.
It validates the 'message' to ensure it is in a specific format.
Microservice 2: Basic Data Transformation
This example performs a simple transformation of a JSON object.
The JSON payload contains data for a 'product' with 'name' and 'price'.
It converts the 'price' to a string.
Microservice 3: Simple Data Handling
This example handles a single data entry.
The request contains a single 'value' field.
The server simply returns the value.