-
Notifications
You must be signed in to change notification settings - Fork 73
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
backend from OAS #340
backend from OAS #340
Conversation
ready for initial review @miguelsorianod |
b807498
to
d89250c
Compare
Hi @eguzki, Also, |
Thanks @abarrak
|
d89250c
to
2b8314a
Compare
Codecov Report
@@ Coverage Diff @@
## main #340 +/- ##
==========================================
+ Coverage 96.43% 96.50% +0.06%
==========================================
Files 290 301 +11
Lines 15121 15422 +301
==========================================
+ Hits 14582 14883 +301
Misses 539 539
Continue to review full report at Codecov.
|
@eguzki Aha, so this PR here is meant to support importing rules, methods, etc. under backend resource? Anyway, for the I'm writing a small plugin to toolbox, and will utilize OAS import + additional creation/update to app-plans, limits, pricing, in addition to some CMS work, and my go-to for the Here's a conceptional reference on the topic: |
Exactly. Create a 3scale backend out of a OAS doc.
The question is about which toolbox command makes sense (and what is the signature of it) to bind N backends to some product That command would need a set of N
Cool. If you do not mind, let us have a look at it when it is finished. We can review it and add it to the core command list (maybe with some modifications) if it makes sense for somebody else. The issue (as I see) with the pluging you are describing is that it requires a lot of inputs. 1) the oas, 2) app plans resource. The toolbox provides two commands to do that separately:
To add
That is the primitive I was referring just now. That is implemented in the api-ruby-client lib. |
2b8314a
to
1277962
Compare
ed20786
to
b4a87c7
Compare
b4a87c7
to
8643a17
Compare
https://issues.redhat.com/browse/THREESCALE-7715
Use current Toolbox command for importing OAS and add an option to target a backend API (instead of a Product). The OAS itself won't be stored in 3scale but a backend-api, private base URL, mapping rules and methods will be created.
3scale import openapi -d <remote> --backend <OAS>
Dev notes:
3scale import openapi
has a new optional param:-o json/yaml
. Since this param also affects the existing product import, I have added a report to the existing product import from OAS part that will be written to stdout only when-o
is added. Otherwise, for backward compat, the product import from OAS still writes progress messages to stdout.TODO:
Fixes #262