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

Manage Mapping Rules from commands #355

Open
r-lam opened this issue Jun 9, 2022 · 1 comment
Open

Manage Mapping Rules from commands #355

r-lam opened this issue Jun 9, 2022 · 1 comment

Comments

@r-lam
Copy link

r-lam commented Jun 9, 2022

The toolbox can update proxy related configuration but, limited to proxy endpoint on API, it can't access proxy mapping rules endpoints since there's no command for it.

My use case is a client requirement for translate this process to CI/CD environment with scripts and is getting complex to do with API requests only.

I've already take hands on it: fork the project and start the journey with ruby. So far, manage to code list, create subcommands like:

#3scale mapping-rules list [opts] <remote> <service>
3scale -k mapping-rules create remote 2 --metric-id=6 --http-method=GET --pattern=/api 
3scale -k mapping-rules list remote 2

Any ideas or if this is useful or not?

@eguzki
Copy link
Member

eguzki commented Jun 9, 2022

I think it might be useful.

JFYI, there are "indirect" ways to manage mapping rules. I can think about two ways:

  • Product export to yaml, then add/delete/update mapping rules in the yaml, product import from the yaml. The toolbox will ensure that 3scale configuration matches the one in the yaml doc.
  • Manage the mapping rules from the OpenAPI spec doc. Change your OAS operations (translated to 3scale mapping rules) and run 3scale import openapi. The toolbox will ensure that 3scale configuration matches the one in the OAS doc.

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

No branches or pull requests

2 participants