Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

KEYCLOAK-12231 Add description to all the fields #103

Conversation

slaskawi
Copy link
Contributor

JIRA ID

KEYCLOAK-12231

Additional Information

This Pull Request adds a lot of documentation to the Go objects and CRDs. Note, that once comments are added to the code, we need to regenerate both Open API and K8s objects by invoking:

operator-sdk-local generate k8s
operator-sdk-local generate openapi

Verification Steps

Checklist:

  • Verified by team member
  • Comments where necessary
  • Automated Tests
  • Documentation changes if necessary

Additional Notes

@coveralls
Copy link

coveralls commented Nov 28, 2019

Coverage Status

Coverage decreased (-0.09%) to 42.369% when pulling d6203c6 on slaskawi:KEYCLOAK-12231-add-description-to-all-fields into fb19ff4 on keycloak:master.

Copy link
Contributor

@stianst stianst left a comment

Choose a reason for hiding this comment

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

See comments below

@slaskawi slaskawi force-pushed the KEYCLOAK-12231-add-description-to-all-fields branch from 321d070 to d6203c6 Compare November 29, 2019 09:24
@slaskawi
Copy link
Contributor Author

@stianst Updated. Ready for the next round.

@abstractj abstractj self-assigned this Dec 2, 2019
@abstractj abstractj requested review from stianst and removed request for davidffrench and pb82 December 2, 2019 12:39
@abstractj
Copy link
Contributor

@slaskawi yamlint reported some issues that might worth to take a look:

./keycloak.org_keycloakrealms_crd.yaml
  1:1       warning  missing document start "---"  (document-start)
  20:81     error    line too long (86 > 80 characters)  (line-length)
  21:81     error    line too long (81 > 80 characters)  (line-length)
  22:81     error    line too long (152 > 80 characters)  (line-length)
  25:81     error    line too long (82 > 80 characters)  (line-length)
  26:81     error    line too long (82 > 80 characters)  (line-length)
  27:81     error    line too long (156 > 80 characters)  (line-length)
  32:81     error    line too long (83 > 80 characters)  (line-length)
  38:81     error    line too long (89 > 80 characters)  (line-length)
  41:81     error    line too long (89 > 80 characters)  (line-length)
  42:81     error    line too long (85 > 80 characters)  (line-length)
  45:81     error    line too long (83 > 80 characters)  (line-length)
  49:81     error    line too long (82 > 80 characters)  (line-length)
  50:81     error    line too long (82 > 80 characters)  (line-length)
  54:81     error    line too long (89 > 80 characters)  (line-length)
  55:81     error    line too long (84 > 80 characters)  (line-length)
  56:81     error    line too long (83 > 80 characters)  (line-length)
  57:81     error    line too long (83 > 80 characters)  (line-length)
  63:21     error    wrong indentation: expected 22 but found 20  (indentation)
  70:81     error    line too long (82 > 80 characters)  (line-length)
  71:81     error    line too long (82 > 80 characters)  (line-length)
  72:81     error    line too long (82 > 80 characters)  (line-length)
  73:81     error    line too long (86 > 80 characters)  (line-length)
  101:81    error    line too long (82 > 80 characters)  (line-length)
  127:81    error    line too long (87 > 80 characters)  (line-length)
  133:81    error    line too long (90 > 80 characters)  (line-length)
  163:81    error    line too long (85 > 80 characters)  (line-length)
  191:81    error    line too long (83 > 80 characters)  (line-length)
  218:21    error    wrong indentation: expected 22 but found 20  (indentation)
  239:81    error    line too long (85 > 80 characters)  (line-length)
  257:81    error    line too long (85 > 80 characters)  (line-length)
  266:81    error    line too long (84 > 80 characters)  (line-length)
  298:81    error    line too long (87 > 80 characters)  (line-length)
  362:15    error    wrong indentation: expected 16 but found 14  (indentation)
  377:11    error    wrong indentation: expected 12 but found 10  (indentation)
  380:81    error    line too long (86 > 80 characters)  (line-length)
  386:81    error    line too long (82 > 80 characters)  (line-length)
  393:81    error    line too long (82 > 80 characters)  (line-length)
  401:81    error    line too long (88 > 80 characters)  (line-length)
  402:81    error    line too long (85 > 80 characters)  (line-length)
  406:11    error    wrong indentation: expected 12 but found 10  (indentation)
  414:3     error    wrong indentation: expected 4 but found 2  (indentation)

./keycloak.org_keycloakusers_crd.yaml
  1:1       warning  missing document start "---"  (document-start)
  20:81     error    line too long (86 > 80 characters)  (line-length)
  21:81     error    line too long (81 > 80 characters)  (line-length)
  22:81     error    line too long (152 > 80 characters)  (line-length)
  25:81     error    line too long (82 > 80 characters)  (line-length)
  26:81     error    line too long (82 > 80 characters)  (line-length)
  27:81     error    line too long (156 > 80 characters)  (line-length)
  32:81     error    line too long (81 > 80 characters)  (line-length)
  35:81     error    line too long (82 > 80 characters)  (line-length)
  38:81     error    line too long (89 > 80 characters)  (line-length)
  41:81     error    line too long (89 > 80 characters)  (line-length)
  42:81     error    line too long (85 > 80 characters)  (line-length)
  45:81     error    line too long (83 > 80 characters)  (line-length)
  49:81     error    line too long (82 > 80 characters)  (line-length)
  50:81     error    line too long (82 > 80 characters)  (line-length)
  54:81     error    line too long (89 > 80 characters)  (line-length)
  55:81     error    line too long (84 > 80 characters)  (line-length)
  56:81     error    line too long (83 > 80 characters)  (line-length)
  57:81     error    line too long (83 > 80 characters)  (line-length)
  63:21     error    wrong indentation: expected 22 but found 20  (indentation)
  70:81     error    line too long (82 > 80 characters)  (line-length)
  71:81     error    line too long (82 > 80 characters)  (line-length)
  72:81     error    line too long (82 > 80 characters)  (line-length)
  73:81     error    line too long (86 > 80 characters)  (line-length)
  92:81     error    line too long (81 > 80 characters)  (line-length)
  155:11    error    wrong indentation: expected 12 but found 10  (indentation)
  158:81    error    line too long (84 > 80 characters)  (line-length)
  161:81    error    line too long (82 > 80 characters)  (line-length)
  168:11    error    wrong indentation: expected 12 but found 10  (indentation)
  174:3     error    wrong indentation: expected 4 but found 2  (indentation)

./keycloak.org_keycloakbackups_crd.yaml
  1:1       warning  missing document start "---"  (document-start)
  20:81     error    line too long (86 > 80 characters)  (line-length)
  21:81     error    line too long (81 > 80 characters)  (line-length)
  22:81     error    line too long (152 > 80 characters)  (line-length)
  25:81     error    line too long (82 > 80 characters)  (line-length)
  26:81     error    line too long (82 > 80 characters)  (line-length)
  27:81     error    line too long (156 > 80 characters)  (line-length)
  32:81     error    line too long (85 > 80 characters)  (line-length)
  35:81     error    line too long (84 > 80 characters)  (line-length)
  36:81     error    line too long (83 > 80 characters)  (line-length)
  40:81     error    line too long (81 > 80 characters)  (line-length)
  41:81     error    line too long (96 > 80 characters)  (line-length)
  42:81     error    line too long (89 > 80 characters)  (line-length)
  43:81     error    line too long (85 > 80 characters)  (line-length)
  44:81     error    line too long (94 > 80 characters)  (line-length)
  45:81     error    line too long (81 > 80 characters)  (line-length)
  49:81     error    line too long (83 > 80 characters)  (line-length)
  50:81     error    line too long (81 > 80 characters)  (line-length)
  51:81     error    line too long (83 > 80 characters)  (line-length)
  52:81     error    line too long (87 > 80 characters)  (line-length)
  53:81     error    line too long (81 > 80 characters)  (line-length)
  54:81     error    line too long (82 > 80 characters)  (line-length)
  55:81     error    line too long (89 > 80 characters)  (line-length)
  59:81     error    line too long (87 > 80 characters)  (line-length)
  64:81     error    line too long (91 > 80 characters)  (line-length)
  65:81     error    line too long (83 > 80 characters)  (line-length)
  66:81     error    line too long (88 > 80 characters)  (line-length)
  67:81     error    line too long (81 > 80 characters)  (line-length)
  68:81     error    line too long (84 > 80 characters)  (line-length)
  69:81     error    line too long (82 > 80 characters)  (line-length)
  74:81     error    line too long (88 > 80 characters)  (line-length)
  77:81     error    line too long (82 > 80 characters)  (line-length)
  84:81     error    line too long (82 > 80 characters)  (line-length)
  92:81     error    line too long (88 > 80 characters)  (line-length)
  93:81     error    line too long (85 > 80 characters)  (line-length)
  97:11     error    wrong indentation: expected 12 but found 10  (indentation)
  104:3     error    wrong indentation: expected 4 but found 2  (indentation)

./keycloak.org_keycloakclients_crd.yaml
  1:1       warning  missing document start "---"  (document-start)
  20:81     error    line too long (86 > 80 characters)  (line-length)
  21:81     error    line too long (81 > 80 characters)  (line-length)
  22:81     error    line too long (152 > 80 characters)  (line-length)
  25:81     error    line too long (82 > 80 characters)  (line-length)
  26:81     error    line too long (82 > 80 characters)  (line-length)
  27:81     error    line too long (156 > 80 characters)  (line-length)
  32:81     error    line too long (85 > 80 characters)  (line-length)
  80:81     error    line too long (81 > 80 characters)  (line-length)
  86:81     error    line too long (84 > 80 characters)  (line-length)
  144:81    error    line too long (84 > 80 characters)  (line-length)
  171:15    error    wrong indentation: expected 16 but found 14  (indentation)
  174:81    error    line too long (82 > 80 characters)  (line-length)
  177:81    error    line too long (89 > 80 characters)  (line-length)
  180:81    error    line too long (89 > 80 characters)  (line-length)
  181:81    error    line too long (85 > 80 characters)  (line-length)
  184:81    error    line too long (83 > 80 characters)  (line-length)
  188:81    error    line too long (82 > 80 characters)  (line-length)
  189:81    error    line too long (82 > 80 characters)  (line-length)
  193:81    error    line too long (89 > 80 characters)  (line-length)
  194:81    error    line too long (84 > 80 characters)  (line-length)
  195:81    error    line too long (83 > 80 characters)  (line-length)
  196:81    error    line too long (83 > 80 characters)  (line-length)
  202:21    error    wrong indentation: expected 22 but found 20  (indentation)
  209:81    error    line too long (82 > 80 characters)  (line-length)
  210:81    error    line too long (82 > 80 characters)  (line-length)
  211:81    error    line too long (82 > 80 characters)  (line-length)
  212:81    error    line too long (86 > 80 characters)  (line-length)
  217:11    error    wrong indentation: expected 12 but found 10  (indentation)
  221:81    error    line too long (88 > 80 characters)  (line-length)
  224:81    error    line too long (82 > 80 characters)  (line-length)
  231:81    error    line too long (82 > 80 characters)  (line-length)
  239:81    error    line too long (88 > 80 characters)  (line-length)
  240:81    error    line too long (85 > 80 characters)  (line-length)
  244:11    error    wrong indentation: expected 12 but found 10  (indentation)
  251:3     error    wrong indentation: expected 4 but found 2  (indentation)

./keycloak.org_keycloaks_crd.yaml
  1:1       warning  missing document start "---"  (document-start)
  20:81     error    line too long (86 > 80 characters)  (line-length)
  21:81     error    line too long (81 > 80 characters)  (line-length)
  22:81     error    line too long (152 > 80 characters)  (line-length)
  25:81     error    line too long (82 > 80 characters)  (line-length)
  26:81     error    line too long (82 > 80 characters)  (line-length)
  27:81     error    line too long (156 > 80 characters)  (line-length)
  35:81     error    line too long (81 > 80 characters)  (line-length)
  44:81     error    line too long (82 > 80 characters)  (line-length)
  49:81     error    line too long (82 > 80 characters)  (line-length)
  50:81     error    line too long (83 > 80 characters)  (line-length)
  51:81     error    line too long (91 > 80 characters)  (line-length)
  52:81     error    line too long (82 > 80 characters)  (line-length)
  53:81     error    line too long (87 > 80 characters)  (line-length)
  54:81     error    line too long (85 > 80 characters)  (line-length)
  55:81     error    line too long (88 > 80 characters)  (line-length)
  56:81     error    line too long (82 > 80 characters)  (line-length)
  57:81     error    line too long (107 > 80 characters)  (line-length)
  58:81     error    line too long (83 > 80 characters)  (line-length)
  59:81     error    line too long (86 > 80 characters)  (line-length)
  60:81     error    line too long (81 > 80 characters)  (line-length)
  61:81     error    line too long (88 > 80 characters)  (line-length)
  62:81     error    line too long (88 > 80 characters)  (line-length)
  63:81     error    line too long (91 > 80 characters)  (line-length)
  67:81     error    line too long (90 > 80 characters)  (line-length)
  72:81     error    line too long (81 > 80 characters)  (line-length)
  75:81     error    line too long (82 > 80 characters)  (line-length)
  83:81     error    line too long (81 > 80 characters)  (line-length)
  86:81     error    line too long (84 > 80 characters)  (line-length)
  90:81     error    line too long (82 > 80 characters)  (line-length)
  97:81     error    line too long (82 > 80 characters)  (line-length)
  105:81    error    line too long (88 > 80 characters)  (line-length)
  106:81    error    line too long (85 > 80 characters)  (line-length)
  113:11    error    wrong indentation: expected 12 but found 10  (indentation)
  123:3     error    wrong indentation: expected 4 but found 2  (indentation)

@abstractj
Copy link
Contributor

@slaskawi overall LGTM, but I would like to hear your opinion about the YAML issues. Maybe, worth to fix them. Great stuff btw.

@stianst stianst merged commit 1b2193c into keycloak:master Dec 5, 2019
@slaskawi
Copy link
Contributor Author

slaskawi commented Dec 5, 2019

@abstractj Those are auto-generated files. A typical workflow includes:

  • Modifying Go types
  • Running operator-sdk generate openapi

I think using longer form of field description (the one with | symbol) or starting with ---- should be Operator SDK responsibility. Perhaps it's worth to file them a JIRA?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants