Skip to content

Instantly share code, notes, and snippets.

@Pchelolo
Created October 16, 2017 08:36
Show Gist options
  • Save Pchelolo/c2e4fc9cfda93b3e96de156b562ea3e5 to your computer and use it in GitHub Desktop.
Save Pchelolo/c2e4fc9cfda93b3e96de156b562ea3e5 to your computer and use it in GitHub Desktop.
/{domain:en.wikipedia.org}:
paths:
/{api:sys}:
x-modules:
- spec:
paths:
/action:
x-modules:
- path: sys/action.js
options:
apiUriTemplate: "{{'https://{domain}/w/api.php'}}"
baseUriTemplate: "{{'https://{domain}:7231/{domain}/v1'}}"
@tgr
Copy link

tgr commented Oct 16, 2017

That exact code didn't work but I could get it to work with some small changes:

          "/{domain:en.wikipedia.org}":
            x-modules:
              - spec:
                  paths:
                    /{api:sys}:
                      x-modules:
                        - spec:
                            paths:
                              /action:
                                x-modules:
                                  - path: sys/action.js
                                    options:
                                      apiUriTemplate: "{{'https://{domain}/w/api.php'}}"
                                      baseUriTemplate: "{{'https://{domain}/api/rest_v1'}}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment