Add REST API stitching

This commit is contained in:
Vikram Rangnekar
2019-05-12 19:27:26 -04:00
parent 6c9accb628
commit f16e95ef22
40 changed files with 1127 additions and 479 deletions

View File

@ -60,7 +60,6 @@ auth:
# public_key_file: /secrets/public_key.pem
# public_key_type: ecdsa #rsa
database:
type: postgres
host: db
@ -80,9 +79,9 @@ database:
# Define defaults to for the field key and values below
defaults:
filter: ["{ user_id: { eq: $user_id } }"]
#filter: ["{ user_id: { eq: $user_id } }"]
# Fields and table names that you wish to block
# Field and table names that you wish to block
blacklist:
- ar_internal_metadata
- schema_migrations
@ -91,10 +90,10 @@ database:
- encrypted
- token
fields:
tables:
- name: users
# This filter will overwrite defaults.filter
filter: ["{ id: { eq: $user_id } }"]
# filter: ["{ id: { eq: $user_id } }"]
- name: products
# Multiple filters are AND'd together
@ -108,6 +107,18 @@ database:
# even defaults.filter
filter: none
remotes:
- name: payments
id: stripe_id
path: data
pass_headers:
- cookie
- host
# set_headers:
# - name: authorize
# value: Bearer 1234567890
url: http://rails_app:3000/stripe/$id
- # You can create new fields that have a
# real db table backing them
name: me
@ -115,4 +126,4 @@ database:
filter: ["{ id: { eq: $user_id } }"]
# - name: posts
# filter: ["{ account_id: { _eq: $account_id } }"]
# filter: ["{ account_id: { _eq: $account_id } }"]

View File

@ -79,7 +79,7 @@ database:
defaults:
filter: ["{ user_id: { eq: $user_id } }"]
# Fields and table names that you wish to block
# Field and table names that you wish to block
blacklist:
- ar_internal_metadata
- schema_migrations
@ -88,7 +88,7 @@ database:
- encrypted
- token
fields:
tables:
- name: users
# This filter will overwrite defaults.filter
filter: ["{ id: { eq: $user_id } }"]