Skip to content

A sample play app which uses swagger plugin to make the age old pet store swagger compliant.

Notifications You must be signed in to change notification settings

mruangutai/swagger-play-sample-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swagger Play Framework Sample App

Overview

This is a project to illustrate use of swagger plugin on play-framework.

Prerequisites

You need the following installed and available in your $PATH:

  • - Play Framework 1.2.3
  • - Scala Plugin (play install scala)
  • - Swagger Core pre-release version
  • - Swagger Play Framework Plugin https://github.com/wordnik/swagger-play
  • - Scala 2.8.1 (http://www.scala-lang.org)

    To build

    Clone swagger-play from https://github.com/wordnik/swagger-play and build it using instructions in the README.md file

    In swagger-play-sample-app, edit conf/dependencies.yml and update the line below to point to your locally cloned (and built) swagger-play. Note! This needs to be an absolute path!

    artifact:   "/path/to/swagger-play"
    

    Build and run swagger-play-sample-app:

    play install scala
    play deps
    play run
    

    Take Swagger UI for a spin

    If you hit http://localhost:9000 you should see swagger-ui (https://github.com/wordnik/swagger-ui) come up for the sample app

    Test API Listing directly

    Open a browser window and confirm you can see API listing by hitting the following URLs

  • - http://localhost:9000/resources.{format} : A list of available resources
  • - http://localhost:9000/help/user.{format} : User Resource API and Models
  • - http://localhost:9000/help/pet.{format} : Pet Resource API and Models
  • - http://localhost:9000/help/store.{format} : Store Resource API and Models
  • About

    A sample play app which uses swagger plugin to make the age old pet store swagger compliant.

    Resources

    Stars

    Watchers

    Forks

    Packages

    No packages published