Services
Services are the logical units that will compose your solution. There are several types of services, such as Web Apis, Background Jobs, among others. Your project can be split into several services, each one with a specific purpose for your business, forming a service oriented solution, or even in the granularity of Microservices.
Fields
A service contains the following fields to be defined:
Name
The name of service to be created.
Requirements Rules:
- Is Required;
- Must not be a Reserved Keyword;
- Must start with a letter;
- Must contains only letters, numbers and the underline char ('_');
- Max length of 50 chars
Example:
1 2 |
|
Type
The type of service to be created.
Possible types are:
- WebApi: A RESTful services, also known as Web APIs
Requirements Rules:
- Is Required;
- Must be an Allowed valid type, according to the types informed above
Example:
1 2 3 |
|
Controllers
A list of classes for the current service, o provide the endpoints (actions) for other applications (like user interfaces or external systems) to communicate with the current service.
Requirements Rules:
- Is Required;
- Each controller on list must have an exclusive 'Name' property value;
- Each controller on list must follows rules as specified in Controller
Example:
1 2 3 4 5 6 7 8 |
|
AllowedScopes
An array of scopes that this service can access through Http calls, using an access token. The scopes here can be understood as the names of the target services.
Each scope defined here will be added as AllowedScope to the service ClientApp via Migration. This grants access from the current service to the target service without the need for manual configuration.
Requirements Rules:
- Must not have duplicate items;
- Must not have empty or null items
Example:
1 2 3 4 5 6 7 8 9 10 |
|
HttpCommunications
An array of HttpCommunication which will be configured at service startup and will make it possible to make Http calls.
Note
If this HttpCommunication has HttpHandlers, the HttpCommunications used as BackChannel will be automatically configured in the service, without the need to enter them manually.
Requirements Rules:
- Must haven't duplicated httpCommunication names;
- Each name on array must exist in HttpCommunication list in the current model
Example:
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Metadata
A set of information and descriptions about the current service.
This information will be published in an online documentation for the service, known as the OpenAPI Specification.
Requirements Rules:
- Must follows rules as specified in Metadata
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Complete Example
See below for a complete example, containing all the properties for the Services section.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|