jenkinsci / configuration-as-code-plugin

Jenkins Configuration as Code Plugin
https://plugins.jenkins.io/configuration-as-code
MIT License
2.69k stars 718 forks source link

Discrepancy between schema and dynamic documentation in JCASC plugn #2241

Open piglowskilukasz opened 1 year ago

piglowskilukasz commented 1 year ago

Jenkins and plugins versions report

Environment ```text Jenkins: 2.387.1 OS: Linux - 4.14.301-224.520.amzn2.x86_64 --- configuration-as-code:1569.vb_72405b_80249 configuration-as-code-secret-ssm:1.0.1 ```

What Operating System are you using (both controller, and any agents involved in the problem)?

no applicable, using controller

Reproduction steps

  1. Access jenkins.yaml and search for elements: agentProtocols:
    • "JNLP4-connect"
    • "Ping"

image

  1. Access schema https://{JENKINS_URL}/configuration-as-code/schema and search for same element: agentProtocols and result is as below: "agentProtocols": {"type": "string"}, "local": { "additionalProperties": false, "type": "object", image

  2. Access jcasc documentation https://{JENKINS_URL}/configuration-as-code/reference and search for same element: agentProtocols and result is as below:

agentProtocols: list ofString

image

Expected Results

In jenkins. yaml file it is defined as array type and documentation is generating this type correctly as below. The problem is with the schema output as same element is defined as string type and that is incorrect as it should be array.

Actual Results

It is a discrepancy for some type elements between dynamic documentation and schema which are provided by JCASC plugin.

Anything else?

No response

piglowskilukasz commented 1 year ago

Is anybody else experiencing similar issue? please let me know if you require more inputs to this thread

timja commented 1 year ago

The schema isn't accurate unfortunately, some stuff works but the work was never really finished

tim-goto commented 11 months ago

Experiencing similar issues. Are there any efforts to finish the schema? How can I help?

timja commented 11 months ago

No efforts going on currently, any tested pull requests that improve the schema generation will be reviewed and merged.