Skip to content

Instantly share code, notes, and snippets.

@federicojd
Created November 25, 2019 14:47
Show Gist options
  • Save federicojd/7378df80ea65f9f171ee7765f44fba4a to your computer and use it in GitHub Desktop.
Save federicojd/7378df80ea65f9f171ee7765f44fba4a to your computer and use it in GitHub Desktop.
repository

…or create a new repository on the command line echo "# rb-website" >> README.md git init git add README.md git commit -m "first commit" git remote add origin [email protected]:federicojd/rb-website.git git push -u origin master …or push an existing repository from the command line git remote add origin [email protected]:federicojd/rb-website.git git push -u origin master

@fIrst2022
Copy link

swagger: '2.0'
info:
version: '1.0'
title: "ISPW.json"
description: Polls is a simple API allowing consumers to view polls and vote in them.
license:
name: MIT
url: https://github.com/apiaryio/polls-api/blob/master/LICENSE
host: polls.apiblueprint.org
basePath: /
schemes:

  • https
    consumes:
  • application/json
    produces:
  • application/json
    paths:
    /questions:
    x-summary: Questions Collection
    get:
    summary: List All Questions
    responses:
    200:
    description: Successful Response
    schema:
    type: array
    items:
    $ref: '#/definitions/Question'
    examples:
    application/json:
    - question: Favourite programming language?
    published_at: '2015-08-05T08:40:51.620Z'
    choices:
    - choice: Swift
    votes: 2048
    - choice: Python
    votes: 1024
    - choice: Objective-C
    votes: 512
    - choice: Ruby
    votes: 256
    post:
    description: >-
    You may create your own question using this action. It takes a JSON
    object containing a question and a collection of answers in the
    form of choices.
    summary: Create a New Question
    parameters:
    - name: body
    in: body
    required: true
    schema:
    $ref: '#/definitions/QuestionRequest'
    responses:
    201:
    description: ''
    schema:
    $ref: '#/definitions/Question'
    examples:
    application/json:
    question: Favourite programming language?
    published_at: '2015-08-05T08:40:51.620Z'
    choices:
    - choice: Swift
    votes: 0
    - choice: Python
    votes: 0
    - choice: Objective-C
    votes: 0
    - choice: Ruby
    votes: 0
    definitions:
    Question:
    title: Question
    type: object
    properties:
    question:
    type: string
    published_at:
    type: string
    choices:
    type: array
    items:
    $ref: '#/definitions/Choice'
    required:
    - question
    - published_at
    - choices
    Choice:
    title: Choice
    type: object
    properties:
    votes:
    type: integer
    format: int32
    choice:
    type: string
    required:
    - votes
    - choice
    QuestionRequest:
    title: Question Request
    type: object
    properties:
    question:
    type: string
    choices:
    type: array
    items:
    type: string
    required:
    - question
    - choices
    example:
    question: Favourite programming language?
    choices:
    - Swift
    - Python
    - Objective-C
    - Ruby

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment