Skip to content

Instantly share code, notes, and snippets.

@3den
Forked from rsukale/swagger-parsing-format.js
Last active April 4, 2017 04:26
Show Gist options
  • Save 3den/b6620a39fa081cc710883815b8f6a4f5 to your computer and use it in GitHub Desktop.
Save 3den/b6620a39fa081cc710883815b8f6a4f5 to your computer and use it in GitHub Desktop.
resources.js
navigation: [
{title: 'Account', href: '/guides/account'},
...
],
resources: {
'account': {
title: 'Account', // x-sfdc-ia-resource
slug: 'account', // parameterized version of x-sfdc-ia-resource
endpoints: [
{
method: 'get',
path: '/AccountList',
summary: 'List all the accounts',
parameters: [
{
description: 'Id of AcceptedEventRelation that needs to be fetched'
in: 'path',
name: 'Id',
required: true,
type: string
}
],
responses: {
200: {
refs: 'Account'
}
}
},
{
method: 'get',
path: '/Account/{id}',
summary: 'Get a single account',
parameters: {},
},
{
method: 'post',
path: '/Account',
summary: 'Create an account',
parameters: { },
responses: {
200: {
refs: '/definitions/Customer'
}
}
}
]
}
//.... all the paths with x-sfdc-ia-resource whose resource = 'Account'
}
definition: {
Account: {},
Customer: {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment