Giter Club home page Giter Club logo

Comments (13)

RobWin avatar RobWin commented on June 14, 2024

Thx.
Yes, the whole Swagger Model/Definitions rendering must be refined in swagger2markup.

from swagger2markup.

yzatslinear avatar yzatslinear commented on June 14, 2024

+1 vote for this feature.

from swagger2markup.

gbaird avatar gbaird commented on June 14, 2024

+1

from swagger2markup.

RobWin avatar RobWin commented on June 14, 2024

Hi sry. I have much to do at work.
I hope I will have time soon.
PRs welcome ;-)

from swagger2markup.

RobWin avatar RobWin commented on June 14, 2024

Fixed in Version 0.2.3

from swagger2markup.

yzatslinear avatar yzatslinear commented on June 14, 2024

Thanks for the update. I tried the updated code and see that that there are now links to definitions in the Responses table. However the links are to anchors in the same file, while the Definitions appear to be a separate file.

from swagger2markup.

RobWin avatar RobWin commented on June 14, 2024

Thx. @yzatslinear I would like to know your opinion. Do you think it even makes sense to create separate files or would you prefer one file.
As a workaround you can use the method asString(). See readme example. And use Asciidoctorj directly.

from swagger2markup.

yzatslinear avatar yzatslinear commented on June 14, 2024

I think a single file would be OK -- I'm not aware of any limitations this would present.

from swagger2markup.

RobWin avatar RobWin commented on June 14, 2024

@yzatslinear The approach with two files is to create an index.adoc which contains:

:doctype: book
:toc: left
:toclevels: 2
:numbered:
:sectlinks:
:sectanchors:

include::paths.adoc[] 
include::definitions.adoc[] 

and run AsciiDcotorJ (or the Gradle plugin). See build.gradle file as an example:

asciidoctor {
    sources {
        include 'index.adoc'
    }
    backends = ['html5', 'pdf']
    attributes = [
            doctype: 'book',
            toc: 'left',
            toclevels: '2',
            numbered: ''
    ]
}

The anchors in HTML work then. Unfortunately PDF seems to have a problem. This must be a bug in org.asciidoctor:asciidoctorj-pdf

I will include the index.adoc in version 0.2.4

from swagger2markup.

RobWin avatar RobWin commented on June 14, 2024

I created an issue regarding the PDF issue.
asciidoctor/asciidoctorj#290

from swagger2markup.

yzatslinear avatar yzatslinear commented on June 14, 2024

Thanks @RobWin,
You say above that you include index.adoc into 0.2.4, but it doesn't appear it made it in ?

from swagger2markup.

RobWin avatar RobWin commented on June 14, 2024

The index.adoc is in /src/docs/asciidoc/
If you run the Gradle asciidoctor task, it creates an index.html in /build/asciidoc
The index.doc is not created automatically, because this concept does not exists in Markdown.

from swagger2markup.

yzatslinear avatar yzatslinear commented on June 14, 2024

Ah, makes sense. Thanks!

from swagger2markup.

Related Issues (20)

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.