Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release 197] manual service config api description #22

Merged
merged 2 commits into from
Mar 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions spec/descriptions/addManualServiceConfigs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Add a manual service configuration.

**This is an experimental endpoint to workaround service mapping issues.**

### Mandatory Parameters:

**tagFilterExpression** A tag filter expression to match calls on which the manual service configuration will be applied. Only call tags are allowed in the expression.

### Optional Parameters:
**unmonitoredServiceName** Specify a service name if you want to map calls to an unmonitored service.

**existingServiceId** Specify a service id if you want to map calls to an existing service.

**description** A description of the configuration.

**enabled** Enable or disable the configuration.

Note: Either unmonitoredServiceName or existingServiceId should be specified in a configuration.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be nice if we could express this in the API. In swagger there is oneOf if I remember correctly, maybe there is something similar in OpenAPI.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks to me that oneOf can only be applied to the request object schema, not to each parameter of the schema.

I found https://stackoverflow.com/questions/29708505/swagger-2-0-how-to-make-one-or-the-other-parameter-required and it points to this open issue OAI/OpenAPI-Specification#256 which could eventually address this use case


### Defaults
**enabled** `true`
3 changes: 3 additions & 0 deletions spec/descriptions/deleteManualServiceConfigs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Delete a manual service configuration.

**This is an experimental endpoint to workaround service mapping issues.**
3 changes: 3 additions & 0 deletions spec/descriptions/getAllManualServiceConfigs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Get all manual service configurations.

**This is an experimental endpoint to workaround service mapping issues.**
21 changes: 21 additions & 0 deletions spec/descriptions/replaceAllManualServiceConfigs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Replace all manual service configurations.

**This is an experimental endpoint to workaround service mapping issues.**

### Mandatory Parameters:

**tagFilterExpression** A tag filter expression to match calls on which the manual service configuration will be applied. Only call tags are allowed in the expression.

### Optional Parameters:
**unmonitoredServiceName** Specify a service name if you want to map calls to an unmonitored service.

**existingServiceId** Specify a service id if you want to map calls to an existing service.

**description** A description of the configuration.

**enabled** Enable or disable the configuration.

Note: Either unmonitoredServiceName or existingServiceId should be specified in a configuration.

### Defaults
**enabled** `true`
21 changes: 21 additions & 0 deletions spec/descriptions/updateManualServiceConfigs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Update a manual service configuration.

**This is an experimental endpoint to workaround service mapping issues.**

### Mandatory Parameters:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no rule id?

Copy link
Author

@yiquanzhou yiquanzhou Mar 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rule id is specified in the query parameter.

I just realise that maybe these "Mandatory Parameters" or "Optional Parameters" are intended to specify the query parameters, not the fields in the query payload objects... Although we used it for describing QB2 tagFilterExpression field as well


**tagFilterExpression** A tag filter expression to match calls on which the manual service configuration will be applied. Only call tags are allowed in the expression.

### Optional Parameters:
**unmonitoredServiceName** Specify a service name if you want to map calls to an unmonitored service.

**existingServiceId** Specify a service id if you want to map calls to an existing service.

**description** A description of the configuration.

**enabled** Enable or disable the configuration.

Note: Either unmonitoredServiceName or existingServiceId should be specified in a configuration.

### Defaults
**enabled** `true`