-
Notifications
You must be signed in to change notification settings - Fork 122
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
YAML Support #159
Comments
it will look like this: ---
name: RESTool App
favicon: https://www.commoninja.com/public/favicon.ico
baseUrl: https://restool-sample-app.herokuapp.com/api
pages:
- name: Cast & Characters
id: characters
description: Manage GOT characters location and budget.
methods:
getAll:
label: Get All
dataPath: items
url: "/character"
queryParams:
- name: search
value: ''
label: Search
type: text
display:
type: cards
fields:
- name: thumbnail
type: image
label: Thumbnail
- name: id
type: text
label: ID
- name: name
type: text
label: Name
- name: realName
type: text
label: Real Name
- name: location
type: text
label: Current Location
- name: isAlive
type: boolean
label: Alive?
getSingle:
url: "/character/:id"
queryParams: []
requestHeaders: {}
put:
url: "/character/:id"
fields:
- name: numberTest
label: Number Test
type: number
- name: location
label: Location
type: select
options:
- Kings Landing
- Beyond the Wall
- Winterfell
- name: isAlive
label: Alive?
type: boolean
post:
url: "/character"
fields:
- name: thumbnail
label: Thumbnail
type: text
- name: name
label: Name
type: text
- name: realName
label: Real Name
type: text
- name: location
label: Location
type: select
options:
- Kings Landing
- Beyond the Wall
- Winterfell
- name: isAlive
label: Alive?
type: boolean
delete:
url: "/character/:id"
customActions:
- name: Send Email
url: "/character/:id/sendEmail"
actualMethod: post
icon: envelope
fields:
- name: id
type: text
label: ID
readonly: true
- name: title
type: text
label: Email Title
required: true
- name: body
type: text
label: Email Body
required: true
- name: Disable Character
url: "/character/:id/disable"
actualMethod: post
icon: ban
fields:
- name: id
type: text
label: Contact ID
readonly: true
- name: Employees
id: employees
description: Manage GOT employees, people and employees.
methods:
getAll:
label: Get All
dataPath: items
url: "/employee"
queryParams:
- name: search
value: ''
label: Search
type: text
display:
type: table
fields:
- name: id
type: text
label: ID
- name: name
type: text
label: Name
- name: jobTitle
type: text
label: Job Title
- name: isFired
type: boolean
label: Fired?
getSingle:
url: "/employee/:id"
queryParams: []
requestHeaders: {}
put:
url: "/employee/:id"
fields:
- name: name
label: Name
type: text
- name: jobTitle
type: select
label: Job Title
options:
- Executive Producer
- Co-Executive Producer
- "RESTool creator \U0001F60E"
- A Knows nothing dude.
- name: isFired
type: boolean
label: Fired?
post:
url: "/employee"
fields:
- name: name
label: Name
type: text
- name: jobTitle
type: select
label: Job Title
options:
- Executive Producer
- Co-Executive Producer
- "RESTool creator \U0001F60E"
- A Knows nothing dude.
- name: isFired
type: boolean
label: Fired?
delete:
url: "/employee/:id"
- name: Deads
id: deads
description: "Manage GOT deads \U0001F635"
methods:
getAll:
label: Get All
dataPath: items
url: "/dead"
queryParams:
- name: search
value: ''
label: Search
type: text
display:
type: table
fields:
- name: id
type: text
label: ID
- name: name
type: text
label: Name
- name: reason
type: text
label: Death Reason
getSingle:
url: "/dead/:id"
queryParams: []
requestHeaders: {}
put:
url: "/dead/:id"
fields:
- name: name
label: Name
type: text
- name: reason
label: Reason
type: text
post:
url: "/dead"
fields:
- name: name
label: Name
type: text
- name: reason
label: Reason
type: text
delete:
url: "/dead/:id"
- name: Extras
id: extras
description: Manage GOT extras location and budget.
methods:
getAll:
label: Get All
dataPath: items
url: "/extra"
queryParams:
- name: search
value: ''
label: Search
type: text
display:
type: table
fields:
- name: id
type: text
label: ID
- name: name
type: text
label: Name
getSingle:
url: "/extra/:id"
queryParams: []
requestHeaders: {}
put:
url: "/extra/:id"
fields:
- name: name
label: Name
type: text
post:
url: "/extra"
fields:
- name: name
label: Name
type: text
delete:
url: "/extra/:id" |
@v3ss0n Cool! Feel free to open a PR to support that :) |
all the good json-yaml comverters are in golang , notsure how it will fit in this. |
I guess there's a NPM package that converts yaml files to json. |
many are unmaintained , so looking around , found a good one : |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Configuring with json is hard when it grows bigger.
Can we have YAML support? Converting YAML to JSON would be fine for start.
The text was updated successfully, but these errors were encountered: