Coder Social home page Coder Social logo

Comments (8)

bjansen avatar bjansen commented on September 26, 2024

Example here: https://github.com/swagger-api/swagger-core

from gyokuro.

fwgreen avatar fwgreen commented on September 26, 2024

I wonder if ceylon-doc could be used for this some how?

from gyokuro.

jvasileff avatar jvasileff commented on September 26, 2024

@lucaswerkmeister's idea (eclipse-archived/ceylon#2083) would work for this. See eclipse-archived/ceylon#2083 (comment)

from gyokuro.

bjansen avatar bjansen commented on September 26, 2024

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.

lucaswerkmeister avatar lucaswerkmeister commented on September 26, 2024

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.

bjansen avatar bjansen commented on September 26, 2024

Ah, then I need to read the full thread to understand how that would work :D

from gyokuro.

bjansen avatar bjansen commented on September 26, 2024

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.

bjansen avatar bjansen commented on September 26, 2024

Here's what I was able to do with the metamodel:

Archive.zip

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.