Comments (8)
Example here: https://github.com/swagger-api/swagger-core
from gyokuro.
I wonder if ceylon-doc could be used for this some how?
from gyokuro.
@lucaswerkmeister's idea (eclipse-archived/ceylon#2083) would work for this. See eclipse-archived/ceylon#2083 (comment)
from gyokuro.
I don't know if this solution would be flexible enough. Also, it would imply adding more annotations to the program, and those annotations would only be there to generate the doc. They are useless at runtime, and they are useless when you are reading the code.
In my opinion, it would add "noise" in declarations, especially if we have to give those annotations a lot of redundant information. ceylon-doc
will never be aware of the route()
annotation, so this means we would have to specify the path, methods etc a second time in another annotation, just to generate documentation.
from gyokuro.
No, route
would be a “doc annotation” (in addition to being an annotation for your framework), so ceylon doc
would be aware of it and generate documentation from it.
from gyokuro.
Ah, then I need to read the full thread to understand how that would work :D
from gyokuro.
If we go the ceylon-doc way, this feature won't be implemented before 1.3.
Moreover, while it is "easy" to query the metamodel and generate a report for annotated controllers, I'm pretty sure it won't be possible for get()
, post()
etc. without having to actually run the application, or perhaps parse the source code...
from gyokuro.
Here's what I was able to do with the metamodel:
I can't document routes defined via get(), post()
etc., and I can't document HTTP response codes other than the ones automatically returned by the framework. I may need extra annotations to be able to do that.
from gyokuro.
Related Issues (17)
- Allow module to run on Ceylon 1.2.2 HOT 1
- Filters
- Errors when applying a method to a route HOT 1
- Support having default routes without a trailing slash in annotated controllers HOT 3
- Have users import their template library instead of providing it HOT 3
- object controllers HOT 1
- Ability to provide custom controller instances for DI HOT 2
- Custom error handlers/pages
- Add support for path parameters HOT 4
- Websockets HOT 4
- Document default args and nullable params
- release version for ceylon 1.3.3 HOT 1
- (de)serialization HOT 3
- Support MIME types HOT 11
- Document what's logged HOT 1
- Add support for PATCH method HOT 1
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 gyokuro.