-
Notifications
You must be signed in to change notification settings - Fork 71
fix: schema validation in APIML components #4438
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
Open
arxioly
wants to merge
7
commits into
v3.x.x
Choose a base branch
from
reboot/fix/schemas-validation
base: v3.x.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2f06f6e
Fix schemas validation in APIML components
arxioly 6685a6f
update schemas in manifest
arxioly c6b39f7
add default value for authorization provider
arxioly 1f7f144
Merge branch 'v3.x.x' into reboot/fix/schemas-validation
arxioly 9cca442
pr review first part
arxioly c785255
Actualize schemas
arxioly 149e715
Merge branch 'v3.x.x' into reboot/fix/schemas-validation
arxioly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
177 changes: 177 additions & 0 deletions
177
api-catalog-package/src/main/resources/schemas/api-catalog-config.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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." | ||
| }, | ||
| "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
23
api-catalog-package/src/main/resources/schemas/zowe-schema.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.