Skip to content

Latest commit

 

History

History
402 lines (318 loc) · 7.38 KB

API.md

File metadata and controls

402 lines (318 loc) · 7.38 KB

API Summary

Version:     1.0.0
Title:       Example OpenAPI Version 2 Specification
Description: Example OpenAPI Version 2 Specification
Host:        api.example.com
BasePath:    /api
Consumes:    [application/json]
Produces:    [application/json application/text]
/contacts: get
Get a list of contacts by ids

query parameters

  • ids: array

responses

  • code: 200, type: services.ContactResponse
    • id: string
  • code: 400, type: ``
    • code: integer
    • description: string
    • status: string
  • default, type: Error
    • code: integer
    • status: string
/contacts: post
Create a new contact request entity.

body parameter

  • body: services.ContactRequest
    • address: object
      • city: string
      • state: string
      • street: string
      • zipCode: string
    • eMail: string, format: email
    • firstName: string
    • id: string
    • lastName: string

responses

  • code: 200, type: services.ContactResponse
    • id: string
  • default, type: Error
    • code: integer
    • status: string
/contacts: delete
DeleteBulk contact by id

query parameters

  • ids: array

responses

  • default, type: Error
    • code: integer
    • status: string
/contacts/{id}: get
GetOne contact by id
id contact id

path parameters

  • id: integer

responses

  • code: 200, type: services.ContactResponse
    • id: string
  • default, type: Error
    • code: integer
    • status: string
/contacts/{id}: post
Update a contact entity with provided data.

path parameters

  • id: integer

body parameter

  • body: services.ContactRequest
    • address: object
      • city: string
      • state: string
      • street: string
      • zipCode: string
    • eMail: string, format: email
    • firstName: string
    • id: string
    • lastName: string

responses

  • code: 200, type: services.ContactResponse
    • id: string
  • default, type: Error
    • code: integer
    • status: string
/contacts/{id}: put
Replace a contact entity completely.

path parameters

  • id: integer

body parameter

  • body: services.ContactRequest
    • address: object
      • city: string
      • state: string
      • street: string
      • zipCode: string
    • eMail: string, format: email
    • firstName: string
    • id: string
    • lastName: string

responses

  • code: 200, type: services.ContactResponse
    • id: string
  • default, type: Error
    • code: integer
    • status: string
/contacts/{month}-{day}-{year}: get
Get contacts list by date

path parameters

  • month: string
  • day: string
  • year: string

responses

  • code: 200, type: services.ContactResponse
    • id: string
  • default, type: Error
    • code: integer
    • status: string
/doodads: post
Create a new doodad entity.

body parameter

  • body: models.ThingRequest
    • name: string

responses

  • code: 200, type: models.ThingResponse
    • bool: boolean
    • createDate: string, format: date-time,2006-01-02
    • float32: number, format: float
    • float64: number, format: double
    • int: integer
    • int16: integer, format: int16
    • int32: integer, format: int32
    • int64: integer, format: int64
    • int8: integer, format: int8
    • name: string
    • uint: integer
    • uint16: integer, format: int16
    • uint32: integer, format: int32
    • uint64: integer, format: int64
    • uint8: integer, format: int8
    • updateDate: string, format: date-time
  • default, type: Error
    • code: integer
    • status: string
/echo/{input}: get
Echo returns body with 'i's replaced with 'o's

path parameters

  • input: string

responses

  • code: 200, type: EchoResponse
    • output: string
  • default, type: Error
    • code: integer
    • status: string
/ping: post
Ping returns body with 'i's replaced with 'o's

body parameter

  • body: services.PingRequest
    • input: string

responses

  • code: 200, type: services.PingResponse
    • output: string
  • default, type: Error
    • code: integer
    • status: string
/things: get
A short summary of this endpoint

path parameters

  • notgood: stringformat: eMail

query parameters

  • from: string, format: date-time,2006-01-02
  • to: string, format: date-time,2006-01-02

responses

  • code: 200, type: ThingListResponse
    • things: []array
      • bool: boolean
      • createDate: string, format: date-time,2006-01-02
      • float32: number, format: float
      • float64: number, format: double
      • int: integer
      • int16: integer, format: int16
      • int32: integer, format: int32
      • int64: integer, format: int64
      • int8: integer, format: int8
      • name: string
      • uint: integer
      • uint16: integer, format: int16
      • uint32: integer, format: int32
      • uint64: integer, format: int64
      • uint8: integer, format: int8
      • updateDate: string, format: date-time
  • code: 400, type: ``
    • code: integer
    • description: string
    • status: string
  • code: 404, type: ``
    • code: integer
    • description: string
    • status: string
  • default, type: Error
    • code: integer
    • status: string
/things: post
Create thing

body parameter

  • body: models.ThingRequest
    • name: string

responses

  • code: 200, type: models.ThingResponse
    • bool: boolean
    • createDate: string, format: date-time,2006-01-02
    • float32: number, format: float
    • float64: number, format: double
    • int: integer
    • int16: integer, format: int16
    • int32: integer, format: int32
    • int64: integer, format: int64
    • int8: integer, format: int8
    • name: string
    • uint: integer
    • uint16: integer, format: int16
    • uint32: integer, format: int32
    • uint64: integer, format: int64
    • uint8: integer, format: int8
    • updateDate: string, format: date-time
  • default, type: Error
    • code: integer
    • status: string
/things/{category}: get
Get things by category and search query

path parameters

  • category: string

query parameters

  • q: string

responses

  • code: 200, type: ThingListResponse
    • things: []array
      • bool: boolean
      • createDate: string, format: date-time,2006-01-02
      • float32: number, format: float
      • float64: number, format: double
      • int: integer
      • int16: integer, format: int16
      • int32: integer, format: int32
      • int64: integer, format: int64
      • int8: integer, format: int8
      • name: string
      • uint: integer
      • uint16: integer, format: int16
      • uint32: integer, format: int32
      • uint64: integer, format: int64
      • uint8: integer, format: int8
      • updateDate: string, format: date-time
  • default, type: Error
    • code: integer
    • status: string
/things/{id}: delete
Delete thing by id

path parameters

  • id: integer

responses

  • default, type: Error
    • code: integer
    • status: string