Browse Source

Remove swagger's packages and update the openapi spec.

pull/26/head
Zed A. Shaw 2 months ago
parent
commit
e0c380a0f4
5 changed files with 15 additions and 178 deletions
  1. +3
    -3
      package-lock.json
  2. +7
    -54
      public/openapi.json
  3. +5
    -27
      public/openapi.yaml
  4. +0
    -22
      public/swagger/README.md
  5. +0
    -72
      public/swagger/package.json

+ 3
- 3
package-lock.json View File

@@ -3344,9 +3344,9 @@
}
},
"bookshelf": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/bookshelf/-/bookshelf-1.1.0.tgz",
"integrity": "sha512-a4rrDI5pnjnj7xFAT23FJQyVxlrrvRPGUNRNj1upuBC5al7ObvoelTZbmVl9bnj+BZE5x19Y07+p933fCsBHNQ==",
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/bookshelf/-/bookshelf-1.1.1.tgz",
"integrity": "sha512-swHlUoCSBv7lS5P6Sbc3zTo64L8Yal98H7v/d1pJLrQLZjiJYjzsdEwnBmnbIr2zDEAZhJW3OZSJFj8ps6o9pQ==",
"requires": {
"bluebird": "^3.7.2",
"create-error": "~0.3.1",

+ 7
- 54
public/openapi.json View File

@@ -58,18 +58,13 @@
}
],
"paths": {
"/user/{userId}/activity.json": {
"/api/user/activity.json": {
"get": {
"tags": [
"user"
],
"summary": "Get the user's most recent activity.",
"operationId": "list_user_activity_log",
"parameters": [
{
"$ref": "#/components/parameters/userId"
}
],
"responses": {
"200": {
"description": "Array of objects, user's most recent activity.",
@@ -90,11 +85,6 @@
],
"description": "",
"operationId": "add_user_activity",
"parameters": [
{
"$ref": "#/components/parameters/userId"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/StatusResponse"
@@ -102,7 +92,7 @@
}
}
},
"/user/{userId}/badges.json": {
"/api/user/badges.json": {
"summary": "The badges a user has been awarded.",
"get": {
"tags": [
@@ -111,11 +101,6 @@
"summary": "Returns a list of badges awarded.",
"description": "",
"operationId": "list_user_badges",
"parameters": [
{
"$ref": "#/components/parameters/userId"
}
],
"responses": {
"200": {
"description": "Simple object with key=value booleans for what's been awarded.",
@@ -130,18 +115,13 @@
}
}
},
"/user/{userId}/exercise.json": {
"/api/user/exercise.json": {
"get": {
"tags": [
"user"
],
"summary": "User's currently active exercises.",
"operationId": "list_user_active_exercises",
"parameters": [
{
"$ref": "#/components/parameters/userId"
}
],
"responses": {
"200": {
"description": "Array of Objects describing user's current exercises and their status.",
@@ -166,33 +146,16 @@
"200": {
"$ref": "#/components/responses/StatusResponse"
}
},
"parameters": [
{
"name": "userId",
"in": "path",
"description": "Numeric id of the user.",
"required": true,
"example": 24,
"schema": {
"type": "string"
}
}
]
}
}
},
"/user/{userId}/module.json": {
"/api/user/module.json": {
"get": {
"tags": [
"user"
],
"summary": "User's currently active module.",
"operationId": "user-active-module",
"parameters": [
{
"$ref": "#/components/parameters/userId"
}
],
"responses": {
"200": {
"description": "The module currently being completed.",
@@ -217,26 +180,16 @@
"200": {
"$ref": "#/components/responses/StatusResponse"
}
},
"parameters": [
{
"$ref": "#/components/parameters/userId"
}
]
}
}
},
"/user/{userId}/episodes.json": {
"/api/user/episodes.json": {
"get": {
"tags": [
"user"
],
"summary": "Live stream episodes user has seen.",
"operationId": "list_user_seen_episodes",
"parameters": [
{
"$ref": "#/components/parameters/userId"
}
],
"responses": {
"200": {
"description": "Array of Objects listing episodes seen by this user and when.",

+ 5
- 27
public/openapi.yaml View File

@@ -36,14 +36,12 @@ tags:
- name: live
description: Live videos.
paths:
'/user/{userId}/activity.json':
'/api/user/activity.json':
get:
tags:
- user
summary: Get the user's most recent activity.
operationId: list_user_activity_log
parameters:
- $ref: '#/components/parameters/userId'
responses:
'200':
description: Array of objects, user's most recent activity.
@@ -57,12 +55,10 @@ paths:
- user
description: ''
operationId: add_user_activity
parameters:
- $ref: '#/components/parameters/userId'
responses:
'200':
$ref: '#/components/responses/StatusResponse'
'/user/{userId}/badges.json':
'/api/user/badges.json':
summary: The badges a user has been awarded.
get:
tags:
@@ -70,8 +66,6 @@ paths:
summary: Returns a list of badges awarded.
description: ''
operationId: list_user_badges
parameters:
- $ref: '#/components/parameters/userId'
responses:
'200':
description: Simple object with key=value booleans for what's been awarded.
@@ -79,14 +73,12 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ObjectOfBoolean'
'/user/{userId}/exercise.json':
'/api/user/exercise.json':
get:
tags:
- user
summary: User's currently active exercises.
operationId: list_user_active_exercises
parameters:
- $ref: '#/components/parameters/userId'
responses:
'200':
description: Array of Objects describing user's current exercises and their status.
@@ -103,22 +95,12 @@ paths:
responses:
'200':
$ref: '#/components/responses/StatusResponse'
parameters:
- name: userId
in: path
description: Numeric id of the user.
required: true
example: 24
schema:
type: string
'/user/{userId}/module.json':
'/api/user/module.json':
get:
tags:
- user
summary: User's currently active module.
operationId: user-active-module
parameters:
- $ref: '#/components/parameters/userId'
responses:
'200':
description: The module currently being completed.
@@ -135,16 +117,12 @@ paths:
responses:
'200':
$ref: '#/components/responses/StatusResponse'
parameters:
- $ref: '#/components/parameters/userId'
'/user/{userId}/episodes.json':
'/api/user/episodes.json':
get:
tags:
- user
summary: Live stream episodes user has seen.
operationId: list_user_seen_episodes
parameters:
- $ref: '#/components/parameters/userId'
responses:
'200':
description: Array of Objects listing episodes seen by this user and when.

+ 0
- 22
public/swagger/README.md View File

@@ -1,22 +0,0 @@
# Swagger UI Dist
[![NPM version](https://badge.fury.io/js/swagger-ui-dist.svg)](http://badge.fury.io/js/swagger-ui-dist)

# API

This module, `swagger-ui-dist`, exposes Swagger-UI's entire dist folder as a dependency-free npm module.
Use `swagger-ui` instead, if you'd like to have npm install dependencies for you.

`SwaggerUIBundle` and `SwaggerUIStandalonePreset` can be imported:
```javascript
import { SwaggerUIBundle, SwaggerUIStandalonePreset } from "swagger-ui-dist"
```

To get an absolute path to this directory for static file serving, use the exported `getAbsoluteFSPath` method:

```javascript
const swaggerUiAssetPath = require("swagger-ui-dist").getAbsoluteFSPath()

// then instantiate server that serves files from the swaggerUiAssetPath
```

For anything else, check the [Swagger-UI](https://github.com/swagger-api/swagger-ui) repository.

+ 0
- 72
public/swagger/package.json View File

@@ -1,72 +0,0 @@
{
"_from": "swagger-ui-dist",
"_id": "swagger-ui-dist@3.26.0",
"_inBundle": false,
"_integrity": "sha512-z58RlRUk//dTg6jwgFBVv0JNyfDpoRNUgEyoA9cRheNvUuklMTKMY3hgDfXSZpmnGgZEG8iA/SAZGE56hvRuug==",
"_location": "/swagger-ui-dist",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "swagger-ui-dist",
"name": "swagger-ui-dist",
"escapedName": "swagger-ui-dist",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#DEV:/",
"#USER"
],
"_resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.26.0.tgz",
"_shasum": "6dccd492bf9c97fe508d8438c754991277a6164f",
"_spec": "swagger-ui-dist",
"_where": "/Users/zedshaw/Projects/learnjsthehardway",
"bugs": {
"url": "https://github.com/swagger-api/swagger-ui/issues"
},
"bundleDependencies": false,
"contributors": [
{
"url": "in alphabetical order"
},
{
"name": "Anna Bodnia",
"email": "anna.bodnia@gmail.com"
},
{
"name": "Buu Nguyen",
"email": "buunguyen@gmail.com"
},
{
"name": "Josh Ponelat",
"email": "jponelat@gmail.com"
},
{
"name": "Kyle Shockey",
"email": "kyleshockey1@gmail.com"
},
{
"name": "Robert Barnwell",
"email": "robert@robertismy.name"
},
{
"name": "Sahar Jafari",
"email": "shr.jafari@gmail.com"
}
],
"dependencies": {},
"deprecated": false,
"description": "[![NPM version](https://badge.fury.io/js/swagger-ui-dist.svg)](http://badge.fury.io/js/swagger-ui-dist)",
"devDependencies": {},
"homepage": "https://github.com/swagger-api/swagger-ui#readme",
"license": "Apache-2.0",
"main": "index.js",
"name": "swagger-ui-dist",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/swagger-api/swagger-ui.git"
},
"version": "3.26.0"
}

Loading…
Cancel
Save