scalatra-sample-app's People
Forkers
kernicus debop tuliodomingos satishgummadelli pkdevboxy apatil sanyaade-iot flavienbert fokko duguruiyuan jb08 guoyu07 dwelte rahulyhg iamzken junaidpk bhanditz msgpo isabella232 neotim william3johnson inferno-inc seanpm2001scalatra-sample-app's Issues
endpoint and path are redundant
In this file:
https://github.com/wordnik/scalatra-sample-app/blob/master/src/main/scala/com/wordnik/swagger/sample/PetServlet.scala#L33
the endpoint
and path
(first param) are redundant. Is there a need for the endpoint
type or can it be assumed from the path
?
applying .{format} to paths
Swagger defines the request/response format at the api level--it's typically shown in the resource listing like this:
http://petstore.swagger.wordnik.com/api/resources.json
That means, you can get api listings by following the paths with the specified format:
http://petstore.swagger.wordnik.com/api/pet.json
Inside the api, you can then access the resource by concatenating the basePath
in the api listing with the operation path, which by convention has the .{format} in it, if used.
With this example, the http://localhost:8080/api/pet.json
shows the .{format}
correctly, but the servlet listens to the the path without the format:
http://localhost:8080/api/pet/3
Note the missing .json
in the path
Move the project to swagger-samples
poor example
doesn't work, swagger v1, sbt issues. suggest updating or removing.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.