API Publisher registers on startup to the Service Locator to get notified when a microservice has APIs to publish.
When the service locator notifies the API Publisher about a new service coming up, the API Publisher retrieves its API definition and RAML specification, then publish its definition to the API Definition service and its scope to the API Scope service.
- Service Locator
- API Gatekeeper Frontend (SDST allowing API to be published)
- API Definition
- API Scope
- Service Locator
- Metrics/Grafana/Kibana
- Additionally this calls every configured API microservice (asks for API definition and RAML files)
Service locator uses this endpoint to notify of a new microservice
request:
POST /publish
Payload:
{
"serviceName":"hello-world",
"serviceUrl":"http://hello-world.example.com",
"metadata":{
"key1": "value1",
"key2": "value2"
}
}
response:
200 OK
Mongo version 3.2 must be running to execute the tests.
Can start the correct version using docker with the following command:
docker run -p 27017:27017 --name mongo -d mongo:3.2
.
Execute tests via sbt tool:
sbt clean test it:test
This code is open source software licensed under the Apache 2.0 License