Skip to content

Instantly share code, notes, and snippets.

@mentos1386
Created September 3, 2016 10:18
Show Gist options
  • Save mentos1386/a6127300f32c636c583effd4b14eedf8 to your computer and use it in GitHub Desktop.
Save mentos1386/a6127300f32c636c583effd4b14eedf8 to your computer and use it in GitHub Desktop.
Swagger CREST documentation
swagger: '2.0'
info:
title: EVE Online Crest
description: Documentation for EVE Online third-party developers.
version: "0.0.1"
# the domain of the service
host: crest-tq.eveonline.com
securityDefinitions:
authentication:
type: oauth2
authorizationUrl: https://login.eveonline.com/oauth/authorize
tokenUrl: https://login.eveonline.com/oauth/token
flow: accessCode
description: |
Oauth 2.0 Authentication. Required for acces to protected resources (Resources that need scopes)
# scopes:
# read:pets: read your pets
# array of all schemes that your API supports (Could add XML)
schemes:
- https
produces:
- application/json
paths:
/alliances/:
get:
summary: Alliances
# description: List of Alliances.
tags:
- Alliances
responses:
200:
description: List of Alliance
schema:
type: array
items:
# $ref: '#/definitions/Alliance' We aren't getting all this date, so we cant use this :/
type: object
properties:
id:
type: integer
description: Alliance ID
name:
type: string
description: Alliance Name
shortName:
type: string
description: Short Alliance Name
href:
type: string
description: Link to resource
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
/alliances/{id}/:
get:
summary: Specific Alliance
# description: Specifc Alliances.
tags:
- Alliances
responses:
200:
description: Specific Alliance
schema:
$ref: '#/definitions/Alliance'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
parameters:
- name: id
in: path
description: ID of Alliance to fetch
required: true
type: integer
/characters/{id}/:
get:
summary: Specific Character
# description: Specific Character.
tags:
- Character
responses:
200:
description: An array of Alliances
schema:
$ref: '#/definitions/Alliance'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
parameters:
- name: id
in: path
description: ID of Character to fetch
required: true
type: integer
definitions:
Alliance:
type: object
properties:
id:
type: integer
description: Alliance ID
startDate:
type: string
description: Alliance creation Date
corporationsCount:
type: integer
description: Number of Corporations in Alliance
description:
type: string
description: Description of Alliance
deleted:
type: boolean
description: Deletion Status
creatorCorporation:
$ref: '#/definitions/Corporation'
executorCorporation:
$ref: '#/definitions/Corporation'
name:
type: string
description: Alliance name
shortName:
type: string
description: Short Alliance name
creatorCharacter:
$ref: '#/definitions/Corporation'
corporations:
type: array
items:
$ref: '#/definitions/Corporation'
Corporation:
type: object
properties:
name:
type: string
description: Corporation Name
isNPC:
type: boolean
description: Corporation NPC status
logo:
$ref: '#/definitions/Image'
id:
type: integer
description: Corporation ID
Image:
type: object
properties:
32x32:
$ref: '#/definitions/Href'
64x64:
$ref: '#/definitions/Href'
128x128:
$ref: '#/definitions/Href'
256x256:
$ref: '#/definitions/Href'
Href:
type: object
properties:
href:
type: string
description: Link to resource
Error:
type: object
properties:
key:
type: string
message:
type: string
exceptionType:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment