Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Commit

Permalink
update swagger spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiden Keating committed Aug 20, 2019
1 parent 5b908b6 commit 66c3f56
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion fruit-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion fruit-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fruit-app",
"version": "1.0.0",
"version": "1.0.1",
"description": "Fruit CRUD Application",
"main": "server.js",
"repository": "https://github.com/integr8ly/walkthrough-applications",
Expand Down
22 changes: 16 additions & 6 deletions fruit-app/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,14 @@ io.on('connection', () => {

/**
* @swagger
* /api/fruits/{id}:
* /api/fruits:
* post:
* description: create a fruit
* consumes:
* - application/json
* produces:
* - application/json
* parameters:
* - name: id
* in: path
* required: true
* description: id of the fruit
* type: string
* - name: fruit
* in: body
* schema:
Expand All @@ -46,6 +41,11 @@ io.on('connection', () => {
* responses:
* 200:
* description: ok
* schema:
* type: object
* properties:
* name:
* type: string
* 400:
* description: bad input
*/
Expand Down Expand Up @@ -123,6 +123,11 @@ app.get('/api/fruits/:id', (req, res) => {
* responses:
* 200:
* description: ok
* schema:
* type: object
* properties:
* name:
* type: string
* 400:
* description: bad input
* 404:
Expand Down Expand Up @@ -167,6 +172,11 @@ app.put('/api/fruits/:id', (req, res) => {
* responses:
* 200:
* description: ok
* schema:
* type: object
* properties:
* name:
* type: string
* 400:
* description: bad input
*/
Expand Down
2 changes: 1 addition & 1 deletion fruit-app/swagger.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const options = {
definition: {
info: {
title: 'Fruit CRUD Application',
version: '1.0.0',
version: '1.0.1',
description: 'Basic CRUD application for fruit'
},
},
Expand Down
2 changes: 1 addition & 1 deletion fruit-app/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"containers": [
{
"name": "crud-app",
"image": "quay.io/integreatly/fruit-crud-app:1.0.0",
"image": "quay.io/integreatly/fruit-crud-app:1.0.1",
"ports": [
{
"containerPort": 8080,
Expand Down

0 comments on commit 66c3f56

Please sign in to comment.