Skip to content

Commit

Permalink
Restore the Documentation tab for openapi (#3940)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricWittmann authored Nov 6, 2023
1 parent 38f4a86 commit f282538
Show file tree
Hide file tree
Showing 32 changed files with 2,062 additions and 355 deletions.
5 changes: 4 additions & 1 deletion ui/.docker-scripts/create-config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const AUTH_RBAC_ENABLED=process.env["REGISTRY_AUTH_RBAC_ENABLED"] || "false";
const AUTH_OBAC_ENABLED=process.env["REGISTRY_AUTH_OBAC_ENABLED"] || "false";
const AUTH_URL=process.env["REGISTRY_AUTH_URL"] || "";
const AUTH_CLIENT_ID=process.env["REGISTRY_AUTH_CLIENT_ID"] || "registry-ui";
const AUTH_CLIENT_SCOPES=process.env["REGISTRY_AUTH_CLIENT_SCOPES"] || "openid profile email offline_token";
const AUTH_REDIRECT_URL=process.env["REGISTRY_AUTH_REDIRECT_URL"] || "http://localhost:8888";

const FEATURE_READ_ONLY=process.env["REGISTRY_FEATURE_READ_ONLY"] || "false";
Expand All @@ -30,7 +31,8 @@ const CONFIG = {
},
ui: {
contextPath: CONTEXT_PATH,
navPrefixPath: NAV_PREFIX_PATH
navPrefixPath: NAV_PREFIX_PATH,
oaiDocsUrl: "/docs/"
},
auth: {
type: AUTH_TYPE,
Expand All @@ -40,6 +42,7 @@ const CONFIG = {
url: AUTH_URL,
redirectUri: AUTH_REDIRECT_URL,
clientId: AUTH_CLIENT_ID,
scopes: AUTH_CLIENT_SCOPES
}
},
features: {
Expand Down
4 changes: 2 additions & 2 deletions ui/.docker-scripts/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ http {

server {
listen 8080 default_server;
listen [::]:8080 default_server;
#listen [::]:8080 default_server;
server_name _;
root /opt/app-root/src;

Expand Down Expand Up @@ -65,7 +65,7 @@ http {

server {
listen 1337 ssl http2;
listen [::]:1337 ssl http2;
#listen [::]:1337 ssl http2;
server_name _;
root /opt/app-root/src;

Expand Down
1 change: 1 addition & 0 deletions ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ variables can be used to control the behavior of the UI:
| REGISTRY_AUTH_TYPE | Type of authentication to use. [none, oidc] | none |
| REGISTRY_AUTH_URL | URL of the OIDC server. | "" |
| REGISTRY_AUTH_CLIENT_ID | Client ID for auth using OIDC. | registry-ui |
| REGISTRY_AUTH_CLIENT_SCOPES | Scopes to request for the OIDC client. | openid profile email offline_token |
| REGISTRY_AUTH_REDIRECT_URL | Redirect URL when authenticating using OIDC. | http://localhost:8888 |
| REGISTRY_AUTH_RBAC_ENABLED | Enable role based access control. | false |
| REGISTRY_AUTH_OBAC_ENABLED | Enable owner based access control. | false |
Expand Down
2 changes: 1 addition & 1 deletion ui/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@types/node": "20.8.10",
"@typescript-eslint/eslint-plugin": "6.9.1",
"@typescript-eslint/parser": "6.9.1",
"eslint": "8.52.0",
"eslint": "8.53.0",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-react-refresh": "0.4.4"
}
Expand Down
2 changes: 1 addition & 1 deletion ui/ui-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Initialize config.js
`./init-dev.sh none`

Note: the init-dev.sh script just copies an appropriate file from config/config-*.js to the right place. You can
either specify `none`, `oidcjs`, or `oidcjs-rbac` as the argument to the script. The choice depends on how you are
either specify `none`, `oidc`, or `oidc-rbac` as the argument to the script. The choice depends on how you are
running the back-end component.

Start the development server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ var ApicurioRegistryConfig = {
},
ui: {
contextPath: "/",
navPrefixPath: "/"
navPrefixPath: "/",
oaiDocsUrl: "http://localhost:8889"
},
auth: {
type: "oidc",
Expand All @@ -14,6 +15,7 @@ var ApicurioRegistryConfig = {
url: "https://keycloak-rhaf-apicurio-designer.apps.dev-eng-ocp4-mas.dev.3sca.net/realms/registry",
redirectUri: "http://localhost:8888",
clientId: "apicurio-registry",
scopes: "openid profile email offline_token"
}
},
features: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ var ApicurioRegistryConfig = {
},
ui: {
contextPath: "/",
navPrefixPath: "/"
navPrefixPath: "/",
oaiDocsUrl: "http://localhost:8889"
},
auth: {
type: "none"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ var ApicurioRegistryConfig = {
},
ui: {
contextPath: "/",
navPrefixPath: "/"
navPrefixPath: "/",
oaiDocsUrl: "http://localhost:8889"
},
auth: {
type: "oidc",
Expand All @@ -14,6 +15,7 @@ var ApicurioRegistryConfig = {
url: "https://auth.apicur.io/auth/realms/apicurio-local",
redirectUri: "http://localhost:8888",
clientId: "apicurio-registry-ui",
scopes: "openid profile email offline_token"
}
},
features: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ var ApicurioRegistryConfig = {
},
ui: {
contextPath: "/",
navPrefixPath: "/"
navPrefixPath: "/",
oaiDocsUrl: "http://localhost:8889"
},
auth: {
type: "oidc",
Expand All @@ -14,6 +15,7 @@ var ApicurioRegistryConfig = {
url: "https://auth.apicur.io/auth/realms/apicurio-local",
redirectUri: "http://localhost:8888",
clientId: "apicurio-registry-ui",
scopes: "openid profile email offline_token"
}
},
features: {
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions ui/ui-app/init-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ then
CONFIG_TYPE="none"
fi

cp config/version.js version.js
cp config/config-$CONFIG_TYPE.js config.js
cp configs/version.js version.js
cp configs/config-$CONFIG_TYPE.js config.js

echo "Done. Try: 'npm run dev'"
Loading

0 comments on commit f282538

Please sign in to comment.