-
Notifications
You must be signed in to change notification settings - Fork 0
Blueprint Cheat Sheet
Al Beebe edited this page Nov 2, 2015
·
54 revisions
- Microservice that doesn't return a response
- Microservice that returns a single response
- Microservice that can return more then one response
- Microservice that can receive sub requests
- Override the context and payload the client sends to the microservice
- Override the context and payload the microservice returns to the client
- Adding documentation to explain how the microservice works
- Client request that doesn't return a response
- Client request that returns a single response
- Client request that can return more then one response
- Client request that can receive sub requests
- Override the context and payload the microservice sends to the client
- Override the context and payload the client returns to the microservice
- Adding documentation to explain how the request works
microservice {
description "Create a widget"
uri "microservice:///example/v1/create/widget"
}
microservice {
description "Get a widget"
uri "microservice:///example/v1/get/widget"
response {
description "Successfully received a widget back"
uri "resource:///example/reply/widget-instance"
}
}
microservice {
description "Get a widget"
uri "microservice:///example/v1/get/widget"
response {
description "Successfully received a widget back"
uri "resource:///example/reply/widget-instance"
}
response {
description "Failed to get a widget"
uri "resource:///example/reply/error"
}
}
microservice {
description "Get a widget"
uri "microservice:///example/v1/get/widget"
response {
description "Successfully received a widget back"
uri "resource:///example/reply/widget-instance"
}
response {
description "Failed to get a widget"
uri "resource:///example/reply/error"
}
request {
description "Abort getting the original widget and get a different one"
uri "resource:///example/get/widget"
}
}
microservice {
description "Get a widget"
uri "microservice:///example/v1/get/widget"
context {
package "example"
object "new-context"
}
payload {
package "example"
object "widget-lookup"
}
response {
description "Successfully received a widget back"
uri "resource:///example/reply/widget-instance"
}
response {
description "Failed to get a widget"
uri "resource:///example/reply/error"
}
}
microservice {
description "Get a widget"
uri "microservice:///example/v1/get/widget"
response {
description "Successfully received a widget back"
uri "resource:///example/reply/widget"
context {
package "example"
object "new-context"
}
payload {
package "example"
object "widget-instance"
}
}
response {
description "Failed to get a widget"
uri "resource:///example/reply/error"
}
}
microservice {
description "Get a widget"
uri "microservice:///example/v1/get/widget"
documentation "Getting a widget is fairly straightforward.
Just send an Example.Widget object and we'll return
an Example.WidgetInstance if the widget exists.
If for whatever reason the widget cannot be returned,
we'll send you an Example.Error object"
response {
description "Successfully received a widget back"
uri "resource:///example/reply/widget-instance"
}
response {
description "Failed to get a widget"
uri "resource:///example/reply/error"
}
}
client {
description "A new widget was received"
uri "client:///example/v1/new/widget"
}
client {
description "A new widget was received"
uri "client:///example/v1/new/widget"
response {
description "Confirm the widget was received"
uri "resource:///example/received/widget"
}
}
client {
description "A new widget was received"
uri "client:///example/v1/new/widget"
response {
description "Confirm the widget was received"
uri "resource:///example/received/widget"
}
response {
description "Reply with an error"
uri "resource:///example/reply/error"
}
}
client {
description "A new widget was received"
uri "client:///example/v1/new/widget"
response {
description "Confirm the widget was kissed"
uri "resource:///example/kissed/widget"
}
response {
description "Confirm the widget was received"
uri "resource:///example/received/widget"
}
response {
description "Reply with an error"
uri "resource:///example/reply/error"
}
request {
description "Kiss the widget that was just received"
uri "resource:///example/kiss/widget"
}
}
client {
description "A new widget was received"
uri "client:///example/v1/new/widget"
context {
package "example"
object "new-context"
}
payload {
package "example"
object "widget-instance"
}
response {
description "Confirm the widget was received"
uri "resource:///example/received/widget"
}
response {
description "Reply with an error"
uri "resource:///example/reply/error"
}
}
client {
description "A new widget was received"
uri "client:///example/v1/new/widget"
response {
description "Confirm the widget was received"
uri "resource:///example/received/widget"
context {
package "example"
object "new-context"
}
payload {
package "example"
object "generic-success"
}
}
response {
description "Reply with an error"
uri "resource:///example/reply/error"
}
}
client {
description "A new widget was received"
uri "client:///example/v1/new/widget"
documentation "From time to time, new widgets pop into existance.
Whenever this happens, this is how you are notified.
You should save the widget and then confirm you
received the widget."
response {
description "Confirm the widget was received"
uri "resource:///example/received/widget"
}
response {
description "Reply with an error"
uri "resource:///example/reply/error"
}
}