Skip to content

A demonstration of how to define a RESTful in Play 2 using Scala and Swagger

License

Notifications You must be signed in to change notification settings

codesqueak/Scala-Play-Swagger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scala-Play-Swagger

A demonstration of how to define a RESTful interface in Play 2 using Scala and Swagger

What this Contains

This example code was produced as document and to give working examples of how to use Scala / Swagger / Play. It includes:

  1. Use of GET, POST, DELETE, PATH, HEAD and OPTIONS
  2. JSON body object parameters
  3. API parameters
  4. URL embedded parameters
  5. Swagger API annotations
  6. Swagger model annotations
  7. Generation of Swagger JSON

Swagger / Play 2 Support

This is a module to support Swagger annotations within Play Framework controllers

Swagger Play2 Module project in GitHub

Unfortunately the code does not appear to be maintained with the latest release being 2 years old at the time of writing

Swagger / Play 2 Support - Forked and Updated

...however it has been forked and updated. This fork is cross-compiled for Play 2.7 and 2.8 with Scala 2.12 and 2.13.

Forked Swagger Play2 Module

Swagger Code Generator

https://github.com/swagger-api/swagger-codegen

Swagger UI

This link opens the swagger UI in a running project. Unfortunately it defaults the Petstore Demo (why?).

http://localhost:9000/docs/swagger-ui/index.html

Once opened, change the location from https://petstore.swagger.io/v2/swagger.json to /swagger.json

Swagger JSON

This link opens the generated Swagger JSON document in a running project

http://localhost:9000/swagger.json

Coffee

If you find this project useful, you may want to Buy me a Coffee! Thanks 👍

About

A demonstration of how to define a RESTful in Play 2 using Scala and Swagger

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published