client-id-required enforces clients to add client_id and client_secret.
Please refer to below steps.
Add a section called traits: at the root level to define query parameters:
traits:
- client-id-required:
queryParameters:
client_id:
type: string
client_secret:
type: string
2) Reference the trait in each of the methods to specify that each of the methods require these queryparameters. After each method in the RAML file, add is: [client-id-required]. For example:
/users:
get:
is: [client-id-required]
description: Gets a list of JSONPlaceholder users.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit