Comments (6)
I've made some progress, but I'm not sure how far it goes to the real deal. It seems pretty obvious to me that if you're going to return multiple status codes, you're going to want to return multiple types of responses so the progress is only a minor improvement.
from rho.
I don't think things are going to get much better than this using standard function return types. I've previously done some work using others types to wrap the result such as a scalaz disjunction \/
and the stdlib Option
types here which is the only obvious (to me at least) way forward. Perhaps things like the scalaz Validation
will grow along those same lines.
I'm certainly willing to entertain other ideas, but I'm going to shelve this for a while until inspiration comes.
from rho.
I agree with you that being bound to the same result type (e.g. String
or JValue
) is only a minor improvement. At the end we want the concrete types that could potentially be returned to document it with SwaggerSupport
.
from rho.
I would also bring into discussion if our already existing disjunction could extended by using a level in between the Status
types.
scalaz.\/[ClientError[Message],Success[Pet]]
So we can group like this:
Informational
(1xx)Success
(2xx)Redirection
(3xx)Error
(4xx or 5xx)ClientError
(4xx)ServerError
(5xx)
from rho.
After thinking a bit I think a super type that covers the disjunction of N result types could match also our needs.
from rho.
This issue is closed by 8249c8b.
from rho.
Related Issues (20)
- Provide example using the Swagger UI Webjar HOT 1
- Got Error with http4s-scala-xml HOT 2
- NoSuchMethodError from rho 0.20.0-M1 HOT 2
- StringParser for value classes HOT 4
- Broken Links/URLs in `README.md` in branch `master` HOT 1
- Where is RhoService? HOT 2
- Feature Idea: Serving swagger in YAML
- Feature Idea: Customisable generic type names
- Is it possible to disable swagger.json endpoint and generate a plain json?
- Release v0.21.0 with swagger webjar implementation HOT 2
- Simple or-path produces incorrect tags HOT 1
- Getting 405 Method Not Allowed from combined routes HOT 3
- Demo example doesn't work HOT 1
- Non-class Scala types break TypeBuilder
- Logger Options in RhoRoutes
- Publish scala 3 artifacts HOT 3
- Getting 405 Method Not Allowed from combined routes with authentication
- Assembly doesn't like CollectionConverters
- Http4s, Scala, and main dependencies update HOT 3
- Maintainers wanted HOT 6
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.
from rho.