From aa0d72639ecae3b0649761e6ee881a59b2f3e94e Mon Sep 17 00:00:00 2001 From: hackerman <3372410+aeneasr@users.noreply.github.com> Date: Mon, 6 Apr 2020 14:46:02 +0200 Subject: [PATCH] refactor: move docs to this repository (#317) --- .circleci/config.yml | 14 +- {docs/images => .github}/banner_kratos.png | Bin {docs => .schema}/api.swagger.json | 18 +- {docs => .schema}/config.schema.json | 2 +- Makefile | 12 +- README.md | 2 +- cmd/serve.go | 2 +- docs/.editorconfig | 8 + docs/.gitignore | 20 + docs/.prettierignore | 6 + docs/.prettierrc | 5 + docs/.widdershins/config.json | 20 + docs/.widdershins/templates/README.md | 72 + .../.widdershins/templates/authentication.def | 5 + .../templates/authentication_none.def | 3 + docs/.widdershins/templates/callbacks.def | 38 + docs/.widdershins/templates/code_go.dot | 23 + docs/.widdershins/templates/code_http.dot | 7 + docs/.widdershins/templates/code_java.dot | 13 + .../templates/code_javascript.dot | 14 + docs/.widdershins/templates/code_nodejs.dot | 18 + docs/.widdershins/templates/code_python.dot | 10 + docs/.widdershins/templates/code_ruby.dot | 14 + docs/.widdershins/templates/code_shell.dot | 3 + docs/.widdershins/templates/debug.def | 1 + docs/.widdershins/templates/discovery.def | 11 + docs/.widdershins/templates/footer.def | 2 + docs/.widdershins/templates/links.def | 18 + docs/.widdershins/templates/main.dot | 109 + docs/.widdershins/templates/operation.dot | 194 + docs/.widdershins/templates/parameters.def | 39 + docs/.widdershins/templates/responses.def | 92 + docs/.widdershins/templates/security.def | 16 + docs/.widdershins/templates/translations.dot | 16 + docs/README.md | 75 + docs/config.js | 15 + docs/contrib/config.js | 25 + docs/contrib/docs/index.md | 5 + docs/contrib/sidebar.js | 55 + docs/contrib/theme.css | 3 + docs/docs/.gitkeep | 0 docs/docs/concepts/credentials.md | 487 + docs/docs/concepts/email-sms.md | 36 + docs/docs/concepts/federation.md | 14 + docs/docs/concepts/identity-user-model.md | 261 + docs/docs/concepts/index.md | 275 + docs/docs/concepts/securing-applications.md | 8 + docs/docs/concepts/security.md | 219 + docs/docs/concepts/ui-user-interface.md | 35 + docs/docs/further-reading/comparison.md | 7 + docs/docs/further-reading/contrib.md | 18 + docs/docs/index.md | 61 + docs/docs/install.md | 82 + docs/docs/quickstart.mdx | 342 + docs/docs/reference/api.md | 5719 +++++++ docs/docs/reference/configuration.md | 693 + docs/docs/reference/html-forms.md | 50 + docs/docs/reference/json-schema-json-paths.md | 34 + docs/docs/sdk/api.md | 5556 +++++++ docs/docs/sdk/index.md | 29 + docs/docs/self-service/flows/index.md | 31 + .../flows/password-reset-account-recovery.md | 16 + .../self-service/flows/user-facing-errors.md | 49 + .../flows/user-login-user-registration.md | 408 + docs/docs/self-service/flows/user-logout.md | 33 + .../flows/user-settings-profile-management.md | 205 + .../flows/verify-email-account-activation.mdx | 209 + docs/docs/self-service/strategies/index.md | 9 + .../openid-connect-social-sign-in-oauth2.md | 44 + .../strategies/username-email-password.md | 641 + .../docs/self-service/workflows/jobs/after.md | 172 + .../self-service/workflows/jobs/before.md | 9 + docs/docusaurus.config.js | 130 + docs/package-lock.json | 13649 ++++++++++++++++ docs/package.json | 41 + docs/scripts/config.js | 198 + docs/scripts/docker-tag.js | 58 + docs/scripts/fix-api.js | 48 + docs/scripts/rerelease.js | 13 + docs/sidebar.js | 42 + docs/src/css/.gitkeep | 0 docs/src/css/theme.css | 18 + docs/src/pages/index.js | 10 + docs/src/pages/versions.js | 95 + docs/static/img/docs/email-verify-known.png | Bin 0 -> 50120 bytes docs/static/img/docs/email-verify-unknown.png | Bin 0 -> 48487 bytes .../img/docs/mailslurper-quickstart.png | Bin 0 -> 827854 bytes docs/static/img/docs/secureapp-dashboard.png | Bin 0 -> 236267 bytes .../img/docs/secureapp-login-ntrace.png | Bin 0 -> 906068 bytes docs/static/img/docs/secureapp-login.png | Bin 0 -> 741627 bytes .../docs/secureapp-registration-ntrace.png | Bin 0 -> 920173 bytes .../docs/secureapp-registration-pwpolicy.png | Bin 0 -> 804453 bytes .../img/docs/secureapp-registration.png | Bin 0 -> 752972 bytes .../img/docs/secureapp-verified-dashboard.png | Bin 0 -> 976640 bytes docs/static/img/favico.png | Bin 0 -> 78488 bytes docs/static/img/logo-docusaurus-template.svg | 24 + docs/static/img/logo-hydra.svg | 9 + docs/static/img/logo-keto.svg | 23 + docs/static/img/logo-kratos.svg | 9 + docs/static/img/logo-oathkeeper.svg | 9 + docs/versioned_docs/version-v0.1/.gitkeep | 0 .../version-v0.1/concepts/credentials.md | 487 + .../version-v0.1/concepts/email-sms.md | 36 + .../version-v0.1/concepts/federation.md | 14 + .../concepts/identity-user-model.md | 261 + .../version-v0.1/concepts/index.md | 275 + .../concepts/securing-applications.md | 8 + .../version-v0.1/concepts/security.md | 219 + .../concepts/ui-user-interface.md | 35 + .../further-reading/comparison.md | 7 + .../version-v0.1/further-reading/contrib.md | 18 + docs/versioned_docs/version-v0.1/index.md | 61 + docs/versioned_docs/version-v0.1/install.md | 82 + .../version-v0.1/quickstart.mdx | 342 + .../version-v0.1/reference/api.md | 5719 +++++++ .../version-v0.1/reference/configuration.md | 719 + .../version-v0.1/reference/html-forms.md | 50 + .../reference/json-schema-json-paths.md | 34 + docs/versioned_docs/version-v0.1/sdk/api.md | 5556 +++++++ docs/versioned_docs/version-v0.1/sdk/index.md | 29 + .../version-v0.1/self-service/flows/index.md | 31 + .../flows/password-reset-account-recovery.md | 16 + .../self-service/flows/user-facing-errors.md | 49 + .../flows/user-login-user-registration.md | 408 + .../self-service/flows/user-logout.md | 33 + .../flows/user-profile-management.md | 199 + .../flows/verify-email-account-activation.mdx | 209 + .../self-service/strategies/index.md | 9 + .../openid-connect-social-sign-in-oauth2.md | 44 + .../strategies/username-email-password.md | 641 + .../self-service/workflows/jobs/after.md | 172 + .../self-service/workflows/jobs/before.md | 9 + .../version-v0.1-sidebars.json | 227 + docs/versions.json | 3 + driver/configuration/provider_viper_test.go | 4 +- {docs => internal}/.kratos.yaml | 0 internal/httpclient/models/form.go | 2 +- internal/httpclient/models/form_field.go | 12 +- .../models/login_request_method_config.go | 2 +- .../registration_request_method_config.go | 2 +- selfservice/form/fields.go | 12 +- selfservice/form/html_form.go | 2 +- tests/schema_test.go | 2 +- 143 files changed, 47134 insertions(+), 39 deletions(-) rename {docs/images => .github}/banner_kratos.png (100%) rename {docs => .schema}/api.swagger.json (98%) rename {docs => .schema}/config.schema.json (99%) create mode 100644 docs/.editorconfig create mode 100644 docs/.gitignore create mode 100644 docs/.prettierignore create mode 100644 docs/.prettierrc create mode 100644 docs/.widdershins/config.json create mode 100644 docs/.widdershins/templates/README.md create mode 100644 docs/.widdershins/templates/authentication.def create mode 100644 docs/.widdershins/templates/authentication_none.def create mode 100644 docs/.widdershins/templates/callbacks.def create mode 100644 docs/.widdershins/templates/code_go.dot create mode 100644 docs/.widdershins/templates/code_http.dot create mode 100644 docs/.widdershins/templates/code_java.dot create mode 100644 docs/.widdershins/templates/code_javascript.dot create mode 100644 docs/.widdershins/templates/code_nodejs.dot create mode 100644 docs/.widdershins/templates/code_python.dot create mode 100644 docs/.widdershins/templates/code_ruby.dot create mode 100644 docs/.widdershins/templates/code_shell.dot create mode 100644 docs/.widdershins/templates/debug.def create mode 100644 docs/.widdershins/templates/discovery.def create mode 100644 docs/.widdershins/templates/footer.def create mode 100644 docs/.widdershins/templates/links.def create mode 100644 docs/.widdershins/templates/main.dot create mode 100644 docs/.widdershins/templates/operation.dot create mode 100644 docs/.widdershins/templates/parameters.def create mode 100644 docs/.widdershins/templates/responses.def create mode 100644 docs/.widdershins/templates/security.def create mode 100644 docs/.widdershins/templates/translations.dot create mode 100644 docs/README.md create mode 100644 docs/config.js create mode 100644 docs/contrib/config.js create mode 100644 docs/contrib/docs/index.md create mode 100644 docs/contrib/sidebar.js create mode 100644 docs/contrib/theme.css create mode 100644 docs/docs/.gitkeep create mode 100644 docs/docs/concepts/credentials.md create mode 100644 docs/docs/concepts/email-sms.md create mode 100644 docs/docs/concepts/federation.md create mode 100644 docs/docs/concepts/identity-user-model.md create mode 100644 docs/docs/concepts/index.md create mode 100644 docs/docs/concepts/securing-applications.md create mode 100644 docs/docs/concepts/security.md create mode 100644 docs/docs/concepts/ui-user-interface.md create mode 100644 docs/docs/further-reading/comparison.md create mode 100644 docs/docs/further-reading/contrib.md create mode 100644 docs/docs/index.md create mode 100644 docs/docs/install.md create mode 100644 docs/docs/quickstart.mdx create mode 100644 docs/docs/reference/api.md create mode 100644 docs/docs/reference/configuration.md create mode 100644 docs/docs/reference/html-forms.md create mode 100644 docs/docs/reference/json-schema-json-paths.md create mode 100644 docs/docs/sdk/api.md create mode 100644 docs/docs/sdk/index.md create mode 100644 docs/docs/self-service/flows/index.md create mode 100644 docs/docs/self-service/flows/password-reset-account-recovery.md create mode 100644 docs/docs/self-service/flows/user-facing-errors.md create mode 100644 docs/docs/self-service/flows/user-login-user-registration.md create mode 100644 docs/docs/self-service/flows/user-logout.md create mode 100644 docs/docs/self-service/flows/user-settings-profile-management.md create mode 100644 docs/docs/self-service/flows/verify-email-account-activation.mdx create mode 100644 docs/docs/self-service/strategies/index.md create mode 100644 docs/docs/self-service/strategies/openid-connect-social-sign-in-oauth2.md create mode 100644 docs/docs/self-service/strategies/username-email-password.md create mode 100644 docs/docs/self-service/workflows/jobs/after.md create mode 100644 docs/docs/self-service/workflows/jobs/before.md create mode 100644 docs/docusaurus.config.js create mode 100644 docs/package-lock.json create mode 100644 docs/package.json create mode 100644 docs/scripts/config.js create mode 100644 docs/scripts/docker-tag.js create mode 100644 docs/scripts/fix-api.js create mode 100644 docs/scripts/rerelease.js create mode 100644 docs/sidebar.js create mode 100644 docs/src/css/.gitkeep create mode 100644 docs/src/css/theme.css create mode 100644 docs/src/pages/index.js create mode 100644 docs/src/pages/versions.js create mode 100644 docs/static/img/docs/email-verify-known.png create mode 100644 docs/static/img/docs/email-verify-unknown.png create mode 100644 docs/static/img/docs/mailslurper-quickstart.png create mode 100644 docs/static/img/docs/secureapp-dashboard.png create mode 100644 docs/static/img/docs/secureapp-login-ntrace.png create mode 100644 docs/static/img/docs/secureapp-login.png create mode 100644 docs/static/img/docs/secureapp-registration-ntrace.png create mode 100644 docs/static/img/docs/secureapp-registration-pwpolicy.png create mode 100644 docs/static/img/docs/secureapp-registration.png create mode 100644 docs/static/img/docs/secureapp-verified-dashboard.png create mode 100644 docs/static/img/favico.png create mode 100644 docs/static/img/logo-docusaurus-template.svg create mode 100644 docs/static/img/logo-hydra.svg create mode 100644 docs/static/img/logo-keto.svg create mode 100644 docs/static/img/logo-kratos.svg create mode 100644 docs/static/img/logo-oathkeeper.svg create mode 100644 docs/versioned_docs/version-v0.1/.gitkeep create mode 100644 docs/versioned_docs/version-v0.1/concepts/credentials.md create mode 100644 docs/versioned_docs/version-v0.1/concepts/email-sms.md create mode 100644 docs/versioned_docs/version-v0.1/concepts/federation.md create mode 100644 docs/versioned_docs/version-v0.1/concepts/identity-user-model.md create mode 100644 docs/versioned_docs/version-v0.1/concepts/index.md create mode 100644 docs/versioned_docs/version-v0.1/concepts/securing-applications.md create mode 100644 docs/versioned_docs/version-v0.1/concepts/security.md create mode 100644 docs/versioned_docs/version-v0.1/concepts/ui-user-interface.md create mode 100644 docs/versioned_docs/version-v0.1/further-reading/comparison.md create mode 100644 docs/versioned_docs/version-v0.1/further-reading/contrib.md create mode 100644 docs/versioned_docs/version-v0.1/index.md create mode 100644 docs/versioned_docs/version-v0.1/install.md create mode 100644 docs/versioned_docs/version-v0.1/quickstart.mdx create mode 100644 docs/versioned_docs/version-v0.1/reference/api.md create mode 100644 docs/versioned_docs/version-v0.1/reference/configuration.md create mode 100644 docs/versioned_docs/version-v0.1/reference/html-forms.md create mode 100644 docs/versioned_docs/version-v0.1/reference/json-schema-json-paths.md create mode 100644 docs/versioned_docs/version-v0.1/sdk/api.md create mode 100644 docs/versioned_docs/version-v0.1/sdk/index.md create mode 100644 docs/versioned_docs/version-v0.1/self-service/flows/index.md create mode 100644 docs/versioned_docs/version-v0.1/self-service/flows/password-reset-account-recovery.md create mode 100644 docs/versioned_docs/version-v0.1/self-service/flows/user-facing-errors.md create mode 100644 docs/versioned_docs/version-v0.1/self-service/flows/user-login-user-registration.md create mode 100644 docs/versioned_docs/version-v0.1/self-service/flows/user-logout.md create mode 100644 docs/versioned_docs/version-v0.1/self-service/flows/user-profile-management.md create mode 100644 docs/versioned_docs/version-v0.1/self-service/flows/verify-email-account-activation.mdx create mode 100644 docs/versioned_docs/version-v0.1/self-service/strategies/index.md create mode 100644 docs/versioned_docs/version-v0.1/self-service/strategies/openid-connect-social-sign-in-oauth2.md create mode 100644 docs/versioned_docs/version-v0.1/self-service/strategies/username-email-password.md create mode 100644 docs/versioned_docs/version-v0.1/self-service/workflows/jobs/after.md create mode 100644 docs/versioned_docs/version-v0.1/self-service/workflows/jobs/before.md create mode 100644 docs/versioned_sidebars/version-v0.1-sidebars.json create mode 100644 docs/versions.json rename {docs => internal}/.kratos.yaml (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml index 926fe9fc5ba..35bec64673d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,10 +1,11 @@ version: 2.1 orbs: - sdk: ory/sdk@0.1.27 - changelog: ory/changelog@0.0.6 + sdk: ory/sdk@0.1.33 + changelog: ory/changelog@0.0.9 goreleaser: ory/goreleaser@0.0.29 nancy: ory/nancy@0.0.9 + docs: ory/docs@0.0.4 golangci: ory/golangci@0.0.4 jobs: @@ -94,6 +95,15 @@ workflows: only: /.*/ branches: ignore: /master/ + - docs/build: + requires: + - test + - golangci/lint + filters: + tags: + only: /.*/ + branches: + only: master - sdk/release: requires: - test diff --git a/docs/images/banner_kratos.png b/.github/banner_kratos.png similarity index 100% rename from docs/images/banner_kratos.png rename to .github/banner_kratos.png diff --git a/docs/api.swagger.json b/.schema/api.swagger.json similarity index 98% rename from docs/api.swagger.json rename to .schema/api.swagger.json index cd3f7e09932..06337db93d2 100755 --- a/docs/api.swagger.json +++ b/.schema/api.swagger.json @@ -1087,7 +1087,7 @@ ], "properties": { "action": { - "description": "Action should be used as the form action URL (\u003cform action=\"{{ .Action }}\" method=\"post\"\u003e).", + "description": "Action should be used as the form action URL `\u003cform action=\"{{ .Action }}\" method=\"post\"\u003e`.", "type": "string" }, "errors": { @@ -1116,7 +1116,7 @@ ], "properties": { "disabled": { - "description": "Disabled is the equivalent of \u003cinput disabled=\"{{.Disabled}}\"\u003e", + "description": "Disabled is the equivalent of `\u003cinput disabled=\"{{.Disabled}}\"\u003e`", "type": "boolean" }, "errors": { @@ -1127,23 +1127,23 @@ } }, "name": { - "description": "Name is the equivalent of \u003cinput name=\"{{.Name}}\"\u003e", + "description": "Name is the equivalent of `\u003cinput name=\"{{.Name}}\"\u003e`", "type": "string" }, "pattern": { - "description": "Pattern is the equivalent of \u003cinput pattern=\"{{.Pattern}}\"\u003e", + "description": "Pattern is the equivalent of `\u003cinput pattern=\"{{.Pattern}}\"\u003e`", "type": "string" }, "required": { - "description": "Required is the equivalent of \u003cinput required=\"{{.Required}}\"\u003e", + "description": "Required is the equivalent of `\u003cinput required=\"{{.Required}}\"\u003e`", "type": "boolean" }, "type": { - "description": "Type is the equivalent of \u003cinput type=\"{{.Type}}\"\u003e", + "description": "Type is the equivalent of `\u003cinput type=\"{{.Type}}\"\u003e`", "type": "string" }, "value": { - "description": "Value is the equivalent of \u003cinput value=\"{{.Value}}\"\u003e", + "description": "Value is the equivalent of `\u003cinput value=\"{{.Value}}\"\u003e`", "type": "object" } } @@ -1287,7 +1287,7 @@ ], "properties": { "action": { - "description": "Action should be used as the form action URL (\u003cform action=\"{{ .Action }}\" method=\"post\"\u003e).", + "description": "Action should be used as the form action URL `\u003cform action=\"{{ .Action }}\" method=\"post\"\u003e`.", "type": "string" }, "errors": { @@ -1416,7 +1416,7 @@ ], "properties": { "action": { - "description": "Action should be used as the form action URL (\u003cform action=\"{{ .Action }}\" method=\"post\"\u003e).", + "description": "Action should be used as the form action URL `\u003cform action=\"{{ .Action }}\" method=\"post\"\u003e`.", "type": "string" }, "errors": { diff --git a/docs/config.schema.json b/.schema/config.schema.json similarity index 99% rename from docs/config.schema.json rename to .schema/config.schema.json index 2bf8a99aafb..43ce3aa2ea0 100644 --- a/docs/config.schema.json +++ b/.schema/config.schema.json @@ -1,5 +1,5 @@ { - "$id": "https://github.com/ory/kratos/docs/config.schema.json", + "$id": "https://github.com/ory/kratos/.schema/config.schema.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "ORY Kratos Configuration", "type": "object", diff --git a/Makefile b/Makefile index bec156ab28c..198f994d3da 100644 --- a/Makefile +++ b/Makefile @@ -67,14 +67,14 @@ test: test-resetdb # Generates the SDKs .PHONY: sdk sdk: - $$(go env GOPATH)/bin/swagger generate spec -m -o docs/api.swagger.json -x internal/httpclient - $$(go env GOPATH)/bin/swagutil sanitize ./docs/api.swagger.json - $$(go env GOPATH)/bin/swagger validate ./docs/api.swagger.json - $$(go env GOPATH)/bin/swagger flatten --with-flatten=remove-unused -o ./docs/api.swagger.json ./docs/api.swagger.json - $$(go env GOPATH)/bin/swagger validate ./docs/api.swagger.json + $$(go env GOPATH)/bin/swagger generate spec -m -o .schema/api.swagger.json -x internal/httpclient + $$(go env GOPATH)/bin/swagutil sanitize ./.schema/api.swagger.json + $$(go env GOPATH)/bin/swagger validate ./.schema/api.swagger.json + $$(go env GOPATH)/bin/swagger flatten --with-flatten=remove-unused -o ./.schema/api.swagger.json ./.schema/api.swagger.json + $$(go env GOPATH)/bin/swagger validate ./.schema/api.swagger.json rm -rf internal/httpclient mkdir -p internal/httpclient - $$(go env GOPATH)/bin/swagger generate client -f ./docs/api.swagger.json -t internal/httpclient -A Ory_Kratos + $$(go env GOPATH)/bin/swagger generate client -f ./.schema/api.swagger.json -t internal/httpclient -A Ory_Kratos make format quickstart: diff --git a/README.md b/README.md index 1ecc50c2040..f87714a88b9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -
+