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

Getting 404 for Swagger docs in Github pages #24

Closed
jaynarathod opened this issue Jun 20, 2018 · 9 comments
Closed

Getting 404 for Swagger docs in Github pages #24

jaynarathod opened this issue Jun 20, 2018 · 9 comments

Comments

@jaynarathod
Copy link

I tried using https://swagger.io/blog/api-development/generator-openapi-repo/ for generating Swagger docs and host them on GitHub, but getting a 404 for my apis specs:

Here is the API link
Documentation(ReDoc): https://jaynarathod.github.io/spring-boot-docs/
SwaggerUI: https://jaynarathod.github.io/spring-boot-docs/swagger-ui/

Repo https://github.com/jaynarathod/spring-boot-docs

@RomanHotsiy
Copy link
Member

Have you accomplished the steps from README: https://github.com/jaynarathod/jaynarathod.github.io#steps-to-finish?

@jaynarathod
Copy link
Author

jaynarathod commented Jun 20, 2018

Thanks for the reply @RomanGotsiy
I was not able to finish the build on Travis,

I get the following error
exec git config --get remote.origin.url
https://github.com/jaynarathod/github-docs-spring.git
rm -rf .ghpages-tmp
mkdir -p .ghpages-tmp
cd .ghpages-tmp
exec git clone --depth=1 --branch=gh-pages https://github.com/jaynarathod/github-docs-spring.git .
Cloning into '.'...
warning: Could not find remote branch gh-pages to clone.
fatal: Remote branch gh-pages not found in upstream origin
exec: internal error
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! GH-Pages-openapi-spec@0.0.1 deploy: npm run build && deploy-to-gh-pages --update web_deploy
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the GH-Pages-openapi-spec@0.0.1 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/travis/.npm/_logs/2018-06-20T18_17_40_837Z-debug.log

@jaynarathod
Copy link
Author

Any insights on the error @RomanGotsiy ?

@RomanHotsiy
Copy link
Member

@jaynarathod could you try the approach described here: #8?
looks like you have same issue

@jaynarathod
Copy link
Author

Thanks @RomanGotsiy ! That worked for me, adding a new branch called "gh-pages"
But the API documentation I see is not what my API specs have.I see the default echo and user APIs in docs? Any idea why? My swagger APIs on local machine do show the right APIs in the docs

@jaynarathod
Copy link
Author

@RomanGotsiy Did I miss something with the above ^^ ?

@ShangyanLi
Copy link

Thanks @RomanGotsiy ! That worked for me, adding a new branch called "gh-pages"
But the API documentation I see is not what my API specs have.I see the default echo and user APIs in docs? Any idea why? My swagger APIs on local machine do show the right APIs in the docs

I experienced something similar, but visiting the spec URL in an incognito window shows the most recent changes.

@jagoodhand
Copy link

Also getting a 404 for the Swagger-UI. No evidence of any Swagger-UI folder or index page created in a repo as a result of running the script. Redoc web created as expected, and no errors when running the script either.

I'm using AWS CodeBuild as the CI environment with the environment variables:
GH_TOKEN, TRAVIS_REPO_SLUG and TRAVIS set.

@RomanHotsiy
Copy link
Member

Closing as stale

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

No branches or pull requests

4 participants