UNPKG

api-flow

Version:

A flow written in ES6 using Immutable to convert between API description formats (Swagger, etc.) and other programs such as cURL command lines.

245 lines (243 loc) 6.57 kB
#%RAML 0.8 --- "title": "Muse: Mule Sales Enablement API" "version": "v1" "baseUri": "http://localhost:5116/api" "schemas": - "presentation": | { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "description": "A product presentation", "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "fileUrl": { "type": "string" }, "productId": { "type": "string" } }, "required": [ "id", "title", "fileUrl", "productId" ] } - "product": | { "$schema": "http://json-schema.org/draft-03/schema", "type": "object", "description": "A Product", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "imageUrl": { "type": "string" }, "region": { "type": "string" } }, "required": [ "id", "name", "region" ] } "resourceTypes": - &id001 "base": displayName: *id001 - &id002 "collection": displayName: *id002 - &id003 "typedCollection": displayName: *id003 - &id004 "member": displayName: *id004 - &id005 "typedMember": displayName: *id005 "traits": - &id006 "paged": displayName: *id006 - &id007 "secured": displayName: *id007 "/presentations": &id008 "type": "typedCollection" "is": ["secured"] "/{presentationId}": "type": "typedMember" "is": ["secured"] "get": "headers": "Authorization": "description": "The auth token for this request" "responses": !!int "401": "description": "Unauthorized" !!int "200": "body": "application/json": "schema": "presentation" "description": "OK" "put": "headers": "Authorization": "description": "The auth token for this request" "body": "application/json": "schema": "presentation" "responses": !!int "401": "description": "Unauthorized" !!int "200": "body": "application/json": "schema": "presentation" "description": "OK" "patch": "headers": "Authorization": "description": "The auth token for this request" "body": "application/json": "schema": "presentation" "responses": !!int "401": "description": "Unauthorized" !!int "200": "body": "application/json": "schema": "presentation" "description": "OK" "delete": "headers": "Authorization": "description": "The auth token for this request" "responses": !!int "401": "description": "Unauthorized" !!int "200": "description": "OK" "get": "headers": "Authorization": "description": "The auth token for this request" "queryParameters": "title": "type": "string" "displayName": "title" "description": "Filter by title" "start": "displayName": "start" "description": "The first page to return" "type": "number" "pages": "displayName": "pages" "description": "The number of pages to return" "type": "number" "responses": !!int "401": "description": "Unauthorized" !!int "200": "body": "application/json": "schema": "presentation" "description": "OK" "post": "headers": "Authorization": "description": "The auth token for this request" "body": "application/json": "schema": "presentation" "responses": !!int "401": "description": "Unauthorized" !!int "201": "body": "application/json": "schema": "presentation" "description": "Created" "/products": "type": "typedCollection" "is": ["secured"] "/{productId}": "type": "typedMember" "is": ["secured"] "/presentations": *id008 "get": "headers": "Authorization": "description": "The auth token for this request" "responses": !!int "200": "body": "application/json": "schema": "product" "description": "OK" !!int "401": "description": "Unauthorized" "put": "body": "application/json": "schema": "product" "headers": "Authorization": "description": "The auth token for this request" "responses": !!int "200": "body": "application/json": "schema": "product" "description": "OK" !!int "401": "description": "Unauthorized" "patch": "body": "application/json": "schema": "product" "headers": "Authorization": "description": "The auth token for this request" "responses": !!int "200": "body": "application/json": "schema": "product" "description": "OK" !!int "401": "description": "Unauthorized" "delete": "headers": "Authorization": "description": "The auth token for this request" "responses": !!int "200": "description": "OK" !!int "401": "description": "Unauthorized" "get": "headers": "Authorization": "description": "The auth token for this request" "queryParameters": "region": "type": "string" "displayName": "region" "description": "Filter by region" "start": "displayName": "start" "description": "The first page to return" "type": "number" "pages": "displayName": "pages" "description": "The number of pages to return" "type": "number" "responses": !!int "401": "description": "Unauthorized" !!int "200": "body": "application/json": "schema": "product" "description": "OK" "post": "body": "application/json": "schema": "product" "headers": "Authorization": "description": "The auth token for this request" "responses": !!int "201": "body": "application/json": "schema": "product" "description": "Created" !!int "401": "description": "Unauthorized"