Skip to content

Create Restrictions

Jairo Alberto Soto Velasquez edited this page Apr 29, 2022 · 1 revision

The restrictions are grouped in a microservice called variamos_ms_restrictions.

To create new restrictions or modify existing ones

  1. Download the microservice variamos_ms_restrictions from this repository.
  2. Standardize in JSON format the constraint definition and configuration.
  3. Create an endpoint with the name of the restriction in the following folder variamos_ms_restrictions/src/EntryPoints/restrictionEntryPoints.ts
  4. Create a method to process the restriction in the following folder variamos_ms_restrictions/src/Domain/Restriction/restrictionUseCases.ts
  5. Code the logic required to process the constraint in the method created in step 4.
  6. Redeploy the microservice to the cloud.

Finally, tests must be performed to ensure that the microservice is working correctly and that the added code works with its respective configuration.

Note: You can see an example of how to do this by reviewing the code created for the unique name restriction.

Clone this wiki locally