Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQ] General improvement of AsciiDoc generation #11396

Open
lfvjimisola opened this issue Jan 25, 2022 · 6 comments
Open

[REQ] General improvement of AsciiDoc generation #11396

lfvjimisola opened this issue Jan 25, 2022 · 6 comments

Comments

@lfvjimisola
Copy link

lfvjimisola commented Jan 25, 2022

The generated AsciiDoc output is not complete if you compare it to standard swagger.ui (e.g Petstore). Missing things are e.g.

and other such as

Describe the solution you'd like

Update mustaché templates to output more of the information in OpenAPI spec file when generating AsciiDoc.

Describe alternatives you've considered

None other than completely manual writing.

@osfameron
Copy link

osfameron commented Jun 13, 2022

EDIT: deleted grumble about passthrough of notation, which is related to #9324

But... 👍 yes please, this general improvement would be very useful!

osfameron added a commit to osfameron/docs-site that referenced this issue Jun 14, 2022
Block extension to filter text like:

    [markdown]
    --
    Filter some text with [Markdown](https://commonmark.org/help/) syntax.
    --

This is not implemented with a full Markdown parser.
See asciidoctor/kramdown-asciidoc#7
with a link to the "naive series of regexes" used as starting point.

(And note that we use Open structural context
https://docs.asciidoctor.org/asciidoc/latest/blocks/delimited/#summary-of-structural-containers
with `--` delimiters, and headings don’t work inside these.)

This feature is intended for handling OpenAPI specs, which can contain Markdown,
however openapi-generator has poor Asciidoc handling
OpenAPITools/openapi-generator#11396
so instead we add the block delimiters in the template, and let the block filter handle it.
osfameron added a commit to osfameron/docs-site that referenced this issue Jul 1, 2022
Block extension to filter text like:

    [markdown]
    --
    Filter some text with [Markdown](https://commonmark.org/help/) syntax.
    --

This is not implemented with a full Markdown parser.
See asciidoctor/kramdown-asciidoc#7
with a link to the "naive series of regexes" used as starting point.

(And note that we use Open structural context
https://docs.asciidoctor.org/asciidoc/latest/blocks/delimited/#summary-of-structural-containers
with `--` delimiters, and headings don’t work inside these.)

This feature is intended for handling OpenAPI specs, which can contain Markdown,
however openapi-generator has poor Asciidoc handling
OpenAPITools/openapi-generator#11396
so instead we add the block delimiters in the template, and let the block filter handle it.
Create a block with potentially multiple lines (sub-paragraphs)

* Add extensions doc page
@cpkio
Copy link

cpkio commented Jul 29, 2022

It would be nice to expose to Mustache temlplates:

  • tags descriptions
  • security schemes descriptions

@lfvjimisola
Copy link
Author

It would be nice to expose to Mustache temlplates:

  • tags descriptions
  • security schemes descriptions

We are actually considering to leave Open API Tools and create our own jinja2 templates instead due to Open API Tools using Mustache which is logic less.

@lfvjimisola
Copy link
Author

Our work with our own jinja2 template for OpenAPI Spec to AsciiDoc using jinja2 has started. We are hoping to release it as open source.

@dustinmoris
Copy link

@lfvjimisola any updates on your open source project?

@lfvjimisola
Copy link
Author

@lfvjimisola any updates on your open source project?

Yes, see: https://github.com/luftfartsverket/openapi-to-asciidoc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants