From f79e45be710c1b47146d9d9a99032e1bcc3d2b8a Mon Sep 17 00:00:00 2001 From: Tim Lai Date: Wed, 9 Sep 2020 17:30:14 -0700 Subject: [PATCH] chore: update .gitignore with dev-helpers/examples (#6373) * docs: update setting-up.md with local dev --- .gitignore | 1 + docs/development/setting-up.md | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/.gitignore b/.gitignore index ffd6f811..912a2036 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ selenium-debug.log chromedriver.log test/e2e/db.json docs/_book +dev-helpers/examples # dist flavors/**/dist/* diff --git a/docs/development/setting-up.md b/docs/development/setting-up.md index d73214e9..d34cf36e 100644 --- a/docs/development/setting-up.md +++ b/docs/development/setting-up.md @@ -30,6 +30,22 @@ Unsupported Node.js LTS that should still work: 5. Wait a bit 6. Open http://localhost:3200/ +### Using your own local api definition with local dev build + +You can specify a local file in `dev-helpers/index.html` by changing the `url` parameter. This local file MUST be located in the `dev-helpers` directory or a subdirectory. As a convenience and best practice, we recommend that you create a subdirectory, `dev-helpers/examples`, which is already specified in `.gitignore`. + +replace +``` +url: "https://petstore.swagger.io/v2/swagger.json", +``` + +with +``` +url: "./examples/your-local-api-definition.yaml", +``` + +Files in `dev-helpers` should NOT be committed to git. The exception is if you are fixing something in `index.html` or `oauth2-redirect.html`, or introducing a new support file. + ## Bonus points - Swagger UI includes an ESLint rule definition. If you use a graphical editor, consider installing an ESLint plugin, which will point out syntax and style errors for you as you code. -- GitLab