Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
115 lines (107 sloc) 2.32 KB
swagger: '2.0'
info:
title: blog
description: Example for Blog
version: 0.1.0
x-npm-package: blog-example
schemes:
- http
produces:
- application/json
consumes:
- application/json
responses:
BadRequest:
description: "Bad Request"
schema:
$ref: "#/definitions/BadRequest"
InternalError:
description: "Internal Error"
schema:
$ref: "#/definitions/InternalError"
paths:
/students/{student_id}/sections:
get:
operationId: getSectionsForStudent
description: Gets the sections for the specified student
parameters:
- name: student_id
in: path
type: string
required: true
responses:
200:
description: "Success"
schema:
type: array
items:
$ref: "#/definitions/Section"
post:
operationId: postSectionsForStudent
description: Posts the sections for the specified student
parameters:
- name: student_id
in: path
type: string
required: true
- name: sections
in: query
type: string
required: true
- name: userType
in: query
type: string
required: true
enum: *SectionType
responses:
200:
description: "Success"
schema:
type: array
items:
$ref: "#/definitions/Section"
/students/{student_id}/gradeFile:
post:
operationId: postGradeFileForStudent
description: Posts the grade file for the specified student
parameters:
- name: student_id
in: path
type: string
required: true
- name: file
in: body
schema:
$ref: "#/definitions/GradeFile"
responses:
200:
description: "Success"
definitions:
GradeFile:
type: string
format: binary
Section:
type: object
properties:
id:
type: string
name:
type: string
period:
type: string
SectionType:
type: string
enum: &SectionType
- math
- science
- reading
BadRequest:
type: object
properties:
message:
type: string
InternalError:
type: object
properties:
message:
type: string