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

Conversation

yiquanzhou
Copy link

Add API description for manual service config API endpoints

@yiquanzhou yiquanzhou self-assigned this Mar 12, 2021
spec/descriptions/addManualServiceConfigs.md Outdated Show resolved Hide resolved

**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


**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

@yiquanzhou yiquanzhou merged commit 3cb462f into master Mar 22, 2021
@yiquanzhou yiquanzhou deleted the manual-service-config-api-description branch March 22, 2021 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants