Swagger2Markup / swagger2markup

A Swagger to AsciiDoc or Markdown converter to simplify the generation of an up-to-date RESTful API documentation by combining documentation that’s been hand-written with auto-generated API documentation.
Apache License 2.0
2.5k stars 381 forks source link

how to fix the issues of 1. "failed to read extension...."; 2. "failed to read content URI..." #316

Open LANXIANGMING opened 6 years ago

LANXIANGMING commented 6 years ago

Thanks for raising a Swagger2Markup issue. Please provide a brief description of your problem along with the Swagger2Markup version you are using. If possible, please also consider putting together a complete Swagger specification that reproduces the issue. It's better if the Swagger specification is small and isolate the issue.

Hi,

There is a problem that I don't know is at generation of ASCIIDOC stage or convert to HTML. Very appreciate that guide me to solve it

Swagger2Markup version: 1.3.1 and 1.3.3

Problem description: [DEBUG] convertSwagger2markup goal started [DEBUG] swaggerInput: http://localhost:8080/v2/api-docs [DEBUG] outputDir: /Users/lan/eclipse/ds-webapi/target/asciidoc [DEBUG] outputFile: null [DEBUG] swagger2markup.extensions.dynamicDefinitions.contentPath: /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions [DEBUG] swagger2markup.extensions.dynamicOverview.contentPath: /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/overview [DEBUG] swagger2markup.extensions.dynamicPaths.contentPath: /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths [DEBUG] swagger2markup.extensions.dynamicSecurity.contentPath: /Users/lan/eclipse/ds-webapisrc/docs/asciidoc/extensions/security [DEBUG] swagger2markup.markupLanguage: ASCIIDOC [DEBUG] swagger2markup.pathsGroupedBy: TAGS [INFO] reading from http://localhost:8080/v2/api-docs [DEBUG] Generate examples is disabled. [DEBUG] Create separated operation files is disabled. [DEBUG] Create separated definition files is disabled. [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/overview [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/overview [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/overview [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/overview [INFO] Markup document written to: /Users/lan/eclipse/ds-webapi/target/asciidoc/overview.adoc [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths [DEBUG] Added path operation 'showHomePageUsingGET' to tag 'home-controller' [DEBUG] Added path operation 'createPartnerUsingPOST' to tag 'partner-resource' [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [INFO] Processing Spring REST Docs snippet: http://localhost:8080/v2/showHomePageUsingGET/http-request.adoc [DEBUG] Failed to read content URI http://localhost:8080/v2/showHomePageUsingGET/http-request.adoc > http://localhost:8080/v2/showHomePageUsingGET/http-request.adoc [INFO] Processing Spring REST Docs snippet: http://localhost:8080/v2/showHomePageUsingGET/http-response.adoc [DEBUG] Failed to read content URI http://localhost:8080/v2/showHomePageUsingGET/http-response.adoc > http://localhost:8080/v2/showHomePageUsingGET/http-response.adoc [INFO] Processing Spring REST Docs snippet: http://localhost:8080/v2/showHomePageUsingGET/curl-request.adoc [DEBUG] Failed to read content URI http://localhost:8080/v2/showHomePageUsingGET/curl-request.adoc > http://localhost:8080/v2/showHomePageUsingGET/curl-request.adoc [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/showHomePageUsingGET [DEBUG] Operation processed : 'showHomePageUsingGET' (normalized id = 'showHomePageUsingGET') [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [INFO] Processing Spring REST Docs snippet: http://localhost:8080/v2/createPartnerUsingPOST/http-request.adoc [DEBUG] Failed to read content URI http://localhost:8080/v2/createPartnerUsingPOST/http-request.adoc > http://localhost:8080/v2/createPartnerUsingPOST/http-request.adoc [INFO] Processing Spring REST Docs snippet: http://localhost:8080/v2/createPartnerUsingPOST/http-response.adoc [DEBUG] Failed to read content URI http://localhost:8080/v2/createPartnerUsingPOST/http-response.adoc > http://localhost:8080/v2/createPartnerUsingPOST/http-response.adoc [INFO] Processing Spring REST Docs snippet: http://localhost:8080/v2/createPartnerUsingPOST/curl-request.adoc [DEBUG] Failed to read content URI http://localhost:8080/v2/createPartnerUsingPOST/curl-request.adoc > http://localhost:8080/v2/createPartnerUsingPOST/curl-request.adoc [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths/createPartnerUsingPOST [DEBUG] Operation processed : 'createPartnerUsingPOST' (normalized id = 'createPartnerUsingPOST') [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/paths [INFO] Markup document written to: /Users/lan/eclipse/ds-webapi/target/asciidoc/paths.adoc [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions [DEBUG] Definition processed : 'GeneralResponseDto' [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions/GeneralResponseDto [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions/GeneralResponseDto [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions/GeneralResponseDto [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions/GeneralResponseDto [DEBUG] Definition processed : 'MessageDto' [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions/MessageDto [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions/MessageDto [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions/MessageDto [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions/MessageDto [DEBUG] Definition processed : 'Response«GeneralResponseDto»' [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions/Response_GeneralResponseDto [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions/Response_GeneralResponseDto [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions/Response_GeneralResponseDto [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions/Response_GeneralResponseDto [DEBUG] Definition processed : 'PartnerCreateRequestDto' [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions/PartnerCreateRequestDto [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions/PartnerCreateRequestDto [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions/PartnerCreateRequestDto [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions/PartnerCreateRequestDto [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapi/src/docs/asciidoc/extensions/definitions [INFO] Markup document written to: /Users/lan/eclipse/ds-webapi/target/asciidoc/definitions.adoc [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapisrc/docs/asciidoc/extensions/security [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapisrc/docs/asciidoc/extensions/security [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapisrc/docs/asciidoc/extensions/security/token [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapisrc/docs/asciidoc/extensions/security/token [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapisrc/docs/asciidoc/extensions/security/token [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapisrc/docs/asciidoc/extensions/security/token [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapisrc/docs/asciidoc/extensions/security [DEBUG] Failed to read extension files from directory /Users/lan/eclipse/ds-webapisrc/docs/asciidoc/extensions/security [INFO] Markup document written to: /Users/lan/eclipse/ds-webapi/target/asciidoc/security.adoc [DEBUG] convertSwagger2markup goal finished [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 16.455 s [INFO] Finished at: 2018-05-14T11:55:47+08:00 [INFO] Final Memory: 44M/145M [INFO] ------------------------------------------------------------------------

RobWin commented 6 years ago

Maybe a permission error?

LANXIANGMING commented 6 years ago

write permission on OS or read content from URL http://localhost:8080/v2/api-docs? I checked there has write and read permission on the folder of OS, and can get the response return of JSON data from the URL via browser Chrome