OpneAPI 3.0 Documentation Generation

786 views
Skip to first unread message

Aidon

unread,
Oct 23, 2017, 12:33:31 PM10/23/17
to Swagger
I have some OpenAPI 3.0 definitions and I just want to generate some documentation for them (HTML - not overly fussed as to which type.)  Is there an easy way to do this?

I tried the 3.0.0 swagger-codegen-cli-3.0.0.jar (10/19) and that doesn't seem to work:
Exception in thread "main" java.lang.RuntimeException: missing swagger input or config!
        at io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:687)

The new online editor generates documentation to display on the right, is there any easy way to export or generate this?

I feel I'm missing something very simple.

Cheers,
Aidon.

Ron Ratovsky

unread,
Oct 23, 2017, 12:45:57 PM10/23/17
to swagger-sw...@googlegroups.com

Hi Aidon,

 

The codegen doesn’t support OAS3 yet.

The editor simply uses Swagger-UI to render the definitions, you can use that directly.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aidon Jennery

unread,
Oct 23, 2017, 3:29:08 PM10/23/17
to swagger-sw...@googlegroups.com
Thanks, Ron.  Is there a trick to pointing it to a local file that I'm missing?  I get "Failed to load spec." no matter what I try.

Cheers,
Aidon.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

Ron Ratovsky

unread,
Oct 23, 2017, 3:41:07 PM10/23/17
to swagger-sw...@googlegroups.com

You either need to host the file or embed it in the index.html.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--

You received this message because you are subscribed to the Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.

Aidon

unread,
Oct 23, 2017, 4:40:41 PM10/23/17
to Swagger
Hello Ron,

I tried embedding...

const ui = SwaggerUIBundle({
  url: "http://petstore.swagger.io/v2/swagger.json",
  dom_id: '#swagger-ui',
  deepLinking: true,
  spec: {
    ... my json spec ...
  },
  presets: [
  ...

But is blank when index is loaded.  Feeling really stupid right now.

Cheers,
Aidon.

Ron Ratovsky

unread,
Oct 23, 2017, 4:43:29 PM10/23/17
to swagger-sw...@googlegroups.com

Check the browser’s console for any errors.

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Aidon <ai...@jennery.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Monday, October 23, 2017 at 13:40
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Re: OpneAPI 3.0 Documentation Generation

 

Hello Ron,

--

Aidon

unread,
Oct 23, 2017, 5:24:23 PM10/23/17
to Swagger
Sorry Ron, it works!  Simple error - thanks for you help!

So there's no way to generate HTML for 3.0 right now - Swagger UI can be used to render browser doc though (but it needs all the css and js etc), is that a fair summary of the situation?

Many thanks again,
Cheers,
Aidon.


Ron Ratovsky

unread,
Oct 23, 2017, 5:34:02 PM10/23/17
to swagger-sw...@googlegroups.com

Yup. There could be tools out there that are not developed by us that can render OAS3 in a simple HTML, but I don’t know of anything specific.

 

 

 

From: <swagger-sw...@googlegroups.com> on behalf of Aidon <ai...@jennery.com>
Reply-To: "swagger-sw...@googlegroups.com" <swagger-sw...@googlegroups.com>
Date: Monday, October 23, 2017 at 14:24
To: Swagger <swagger-sw...@googlegroups.com>
Subject: Re: OpneAPI 3.0 Documentation Generation

 

Sorry Ron, it works!  Simple error - thanks for you help!

Aidon

unread,
Nov 19, 2017, 4:13:47 PM11/19/17
to Swagger
Hello Ron,

Do you have any idea of when the tools to render OAS3 in any form of HTML might be available?

Cheers,
Aidon.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages