Skip to content

Instantly share code, notes, and snippets.

@scholzie
Created April 16, 2019 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scholzie/df3ae0b9c1859c230412ea88594cab31 to your computer and use it in GitHub Desktop.
Save scholzie/df3ae0b9c1859c230412ea88594cab31 to your computer and use it in GitHub Desktop.
openapi: "3.0.1"
info:
title: "dev-serverless"
version: "2019-02-26T21:20:21Z"
servers:
- url: "https://s2o723jp2f.execute-api.us-east-1.amazonaws.com/{basePath}"
variables:
basePath:
default: "dev"
paths:
/consumers:
get:
tags:
- consumer-info
description: "Get a list of consumers"
operationId: "Get a list of consumers"
parameters:
- $ref: "#/components/parameters/apiKeyParam"
- $ref: "#/components/parameters/subIdParam"
- name: "offset"
description: The number of consumers to skip before collecting the results
in: "query"
schema:
type: integer
minimum: 0
default: 0
- name: "count"
description: The number of consumers to return
in: "query"
schema:
type: integer
minimum: 1
maximum: 100
default: 50
responses:
"200":
description: successful request
content:
application/json:
schema:
type: object
properties:
data:
$ref: "#/components/schemas/ConsumerList"
links:
$ref: "#/components/schemas/Link"
/consumers/{consumer_id}:
get:
tags:
- consumer-info
description: "Get a consumer"
operationId: "Get a consumer"
parameters:
- $ref: "#/components/parameters/apiKeyParam"
- $ref: "#/components/parameters/subIdParam"
- $ref: "#/components/parameters/consumerIdParam"
responses:
"200":
description: successful request
content:
application/json:
schema:
type: object
properties:
data:
#$ref: "#/components/schemas/Consumer"
$ref: "public_endpoints/test/support/schemas/consumer.json"
links:
$ref: "#/components/schemas/Link"
/consumers/{consumer_id}/recommendations:
get:
tags:
- consumer-info
- recommendations
description: "Get a consumer's recommendation"
operationId: "Get a consumer's recommendation"
parameters:
- $ref: "#/components/parameters/apiKeyParam"
- $ref: "#/components/parameters/subIdParam"
- $ref: "#/components/parameters/consumerIdParam"
responses:
"200":
description: successful request
content:
application/json:
schema:
type: object
properties:
data:
$ref: "#/components/schemas/Recommendation"
components:
parameters:
apiKeyParam:
name: "x-api-key"
description: Your given api secret
in: "header"
required: true
schema:
type: "string"
subIdParam:
name: "x-subscriber-id"
description: Your given subscriber id
in: "header"
required: true
schema:
type: "string"
consumerIdParam:
name: "consumer_id"
description: The id of the consumer for whom you are requesting
in: "path"
required: true
schema:
type: "string"
schemas:
Link:
type: object
properties:
self:
type: string
Recommendation:
type: object
properties:
type:
type: string
enum: ["recommendations"]
attributes:
type: object
properties:
problem_description:
type: string
problem_title:
type: string
recommendation_text:
type: string
score_improvement:
type: number
relationships:
type: object
properties:
consumer:
type: object
properties:
links:
type: object
properties:
self:
type: string
enum: ["/consumers/{consumer_id}/recommedations/{id}"]
related:
type:
string
enum:
["/consumers/{consumer_id}"]
ConsumerList:
type: array
items:
type: object
properties:
type:
type: string
enum: ["consumers"]
id:
type: string
links:
$ref: "#/components/schemas/Link"
Consumer:
type: object
properties:
links:
$ref: "#/components/schemas/Link"
type:
type: string
enum: ["consumers"]
id:
type: string
attributes:
type: object
properties:
closed_tradelines:
type: number
dti:
type: number
annual_income:
type: number
open_tradelines:
type: number
total_debt:
type: number
total_monthly_obligation:
type: number
zipcode:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment