Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion api-catalog-package/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ task packageApiCatalog(type: Zip) {
into('/') {
from "$buildDir/convert/manifest.yaml"
from "$resourceDir/pluginDefinition.json"
from "../schemas/catalog-schema.json"
}

into('plugin/') {
Expand All @@ -31,6 +30,11 @@ task packageApiCatalog(type: Zip) {
from "$resourceDir/plugin/web/assets/api-catalog.png"
}

into('schemas/') {
from "$resourceDir/schemas/api-catalog-config.json"
from "$resourceDir/schemas/zowe-schema.json"
}

into('bin/') {
from configurations.catalogServiceJar
from "$resourceDir/bin/start.sh"
Expand Down
4 changes: 3 additions & 1 deletion api-catalog-package/src/main/resources/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ title: API Catalog
description: API Catalog service to display service details and API documentation for discovered API services.
license: EPL-2.0
schemas:
configs: catalog-schema.json
configs:
- schemas/zowe-schema.json
- schemas/api-catalog-config.json
repository:
type: git
url: https://github.com/zowe/api-layer.git
Expand Down
177 changes: 177 additions & 0 deletions api-catalog-package/src/main/resources/schemas/api-catalog-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://zowe.org/schemas/v2/api-catalog-config",
"title": "api-catalog configuration",
"description": "Configuration properties for API Catalog, as specified within a configuration file such as zowe.yaml",
"type": "object",
"properties": {
"port": {
"$ref": "#/$defs/port",
"default": 7554
},
"debug": {
"type": "boolean",
"description": "Enable debug logs in API Catalog",
"default": false
},
"sslDebug": {
"type": "string",
"description": "Configure attributes fro SSL config, see java property javax.net.debug."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "Configure attributes fro SSL config, see java property javax.net.debug."
"description": "Configure attributes for SSL config, see java property javax.net.debug."

},
"heap": {
"type": "object",
"description": "Configure JVM parameters for heap size",
"properties": {
"init": {
"type": "integer",
"description": "Initial heap size in MB.",
"default": 32
},
"max": {
"type": "integer",
"description": "Maximum heap size in MB.",
"default": 512
}
}
},
"apiml": {
"type": "object",
"description": "Zowe API ML specific properties",
"properties": {
"catalog": {
"type": "object",
"description": "API Catalog customization",
"properties": {
"hide": {
"type": "object",
"properties": {
"serviceInfo": {
"type": "boolean",
"description": "Hide the instance URL value of all services registered to the API ML in the API Catalog.",
"default": false
}
}
},
"customStyle": {
"type": "object",
"description": "Customization of the logotype and selected style options",
"properties": {
"logo": {
"type": "string",
"pattern": "^.*\\.(svg|png|jpe?g)$",
"description": "Location of API Catalog logo"
},
"titlesColor": {
"type": "string",
"description": "Color of the Catalog title labels"
},
"fontFamily": {
"type": "string",
"description": "Font family used for the UI"
},
"headerColor": {
"type": "string",
"description": "Header color"
},
"backgroundColor": {
"type": "string",
"description": "Background color for dashboard and detail page"
},
"textColor": {
"type": "string",
"description": "Color used for the UI paragraph texts (i.e. service description)"
},
"docLink": {
"type": "string",
"pattern": "^[^|]+\\|https?:\/\/.+$",
"description": "Custom link that would be displayed in the top right side of the header"
}
}
}
}
},
"health": {
"type": "object",
"properties": {
"protected": {
"type": "boolean",
"description": "Specifies if the /application/health endpoint is protected or accessible without any credentials.",
"default": true
}
}
},
"security": {
"type": "object",
"description": "Security configuration of the API Catalog",
"properties": {
"authorization": {
"type": "object",
"description": "Authorization configuration.",
"properties": {
"provider": {
"type": "string",
"enum": ["endpoint", "native", "dummy"],
"default": "native",
"description": "Specifies security provider to be used by the API Catalog."
}
}
}
}
}
}
},
"server": {
"type": "object",
"description": "Configure API Catalog server properties.",
"properties": {
"ssl": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "To enable SSL/tls layer.",
"default": true
}
}
}
}
},
"spring": {
"type": "object",
"description": "Application framework parameters",
"properties": {
"profiles": {
"type": "object",
"description": "Profiles that can hold multiple configuration parameters.",
"properties": {
"active": {
"type": "string",
"description": "List of the active configuration profiles.",
"pattern": "^[a-zA-Z0-9]+(,[a-zA-Z0-9]+)*$"
}
}
}
}
},
"logging": {
"type": "string",
"description": "Logging configuration for API Catalog service.",
"properties": {
"config": {
"type": "string",
"description": "Path to custom logback configuration file.",
"minLength": 1,
"maxLength": 1024
}
}
}
},
"$defs": {
"port": {
"type": "integer",
"description": "TCP network port",
"minimum": 1024,
"maximum": 65535
}
}
}
23 changes: 23 additions & 0 deletions api-catalog-package/src/main/resources/schemas/zowe-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://zowe.org/schemas/v2/api-catalog",
"allOf": [
{ "$ref": "/schemas/v2/server-base" },
{ "type": "object",
"properties": {
"components": {
"type": "object",
"additionalProperties": true,
"properties": {
"api-catalog": {
"allOf": [
{ "$ref": "/schemas/v2/server-base#zoweComponent" },
{ "$ref": "/schemas/v2/api-catalog-config" }
]
}
}
}
}
}
]
}
1 change: 0 additions & 1 deletion apiml-common-lib-package/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ task packageCommonLib(type: Zip) {

into('/') {
from "$buildDir/convert/manifest.yaml"
from "../schemas/apiml-common-lib-schema.json"
}

into('bin/') {
Expand Down
2 changes: 0 additions & 2 deletions apiml-common-lib-package/src/main/resources/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,3 @@ build:
number: "{{build.number}}"
commitHash: "{{build.commitHash}}"
timestamp: {{build.timestamp}}
schemas:
configs: "apiml-common-lib-schema.json"
6 changes: 5 additions & 1 deletion apiml-package/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ task packageApiml(type: Zip) {
into('/') {
from "$resourceDir/zosmf-static-definition.yaml.template"
from "$buildDir/convert/manifest.yaml"
from "../schemas/apiml-schema.json"
}

into('schemas/') {
from "$resourceDir/schemas/apiml-config.json"
from "$resourceDir/schemas/zowe-schema.json"
}

into('bin/') {
Expand Down
2 changes: 1 addition & 1 deletion apiml-package/src/main/resources/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ _BPX_JOBNAME=${ZWE_zowe_job_prefix}${APIML_CODE} ${JAVA_BIN_DIR}java \
-Dapiml.security.x509.externalMapperUrl=${ZWE_components_gateway_apiml_security_x509_externalMapperUrl:-${ZWE_configs_apiml_security_x509_externalMapperUrl:-"${internalProtocol:-https}://${ZWE_haInstance_hostname:-localhost}:${ZWE_components_gateway_port:-7554}/zss/api/v1/certificate/x509/map"}} \
-Dapiml.security.x509.externalMapperUser=${ZWE_components_gateway_apiml_security_x509_externalMapperUser:-${ZWE_configs_apiml_security_x509_externalMapperUser:-${ZWE_zowe_setup_security_users_zowe:-ZWESVUSR}}} \
-Dapiml.security.x509.registry.allowedUsers=${ZWE_components_gateway_apiml_security_x509_registry_allowedUsers:-${ZWE_configs_apiml_security_x509_registry_allowedUsers:-}} \
-Dapiml.security.zosmf.applid=${ZWE_components_gateway_apiml_security_zosmf_applid:-${ZWE_configs_apiml_security_zosmf_applid:-IZUDFLT}} \
-Dapiml.security.zosmf.applid=${ZWE_zosmf_applId:-IZUDFLT} \
-Dapiml.service.allowEncodedSlashes=${ZWE_components_gateway_apiml_service_allowEncodedSlashes:-${ZWE_configs_apiml_service_allowEncodedSlashes:-true}} \
-Dapiml.service.apimlId=${ZWE_components_gateway_apimlId:-${ZWE_configs_apimlId:-}} \
-Dapiml.service.corsEnabled=${ZWE_components_gateway_apiml_service_corsEnabled:-${ZWE_configs_apiml_service_corsEnabled:-false}} \
Expand Down
4 changes: 3 additions & 1 deletion apiml-package/src/main/resources/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ title: API Mediation Layer
description: API Mediation Layer
license: EPL-2.0
schemas:
configs: apiml-schema.json
configs:
- schemas/zowe-schema.json
- schemas/apiml-config.json
repository:
type: git
url: https://github.com/zowe/api-layer.git
Expand Down
Loading
Loading