Skip to content

Proposal: Add JSONB specs with documentation

Max Orefice requested to merge mo-add-json-schema-doc into master

Part of #219134 (closed)

What does this MR do?

This MR does 2 things:

  1. Creates a new spec which makes sure developers validate their jsonb column is a specific schema
  2. Add a note to our documentation.

Why are we doing this?

Part of @ayufan's proposal we want to ensure developers validate their json schema.

Screenshots

This is how it will look like if you don't validate your json schema 👇

goldenson_Maximes-MacBook-Pro____Code_gitlab-development-kit_gitlab_2020-06-16_14-28-31

Check-list

  • Make sure this MR enables a static analysis check rule for new usage but ignores current offenses
  • Mention this proposal in the relevant Slack channels (e.g. #development, #backend, #frontend)
  • If there is a choice to make between two potential styles, set up an emoji vote in the MR:
    • CHOICE_A: 🅰
    • CHOICE_B: 🅱
    • Vote yourself for both choices so that people know these are the choices
  • The MR doesn't have significant objections, and is getting a majority of 👍 vs 👎 (remember that we don't need to reach a consensus)
  • (If applicable) One style is getting a majority of vote (compared to the other choice)
  • (If applicable) Update the MR with the chosen style
  • Create a follow-up issue to fix the current offenses as a separate iteration: ISSUE_LINK
  • Follow the review process as usual
  • Once approved and merged by a maintainer, mention it again:
    • In the relevant Slack channels (e.g. #development, #backend, #frontend)
    • (Optional depending on the impact of the change) In the Engineering Week in Review

/cc @gitlab-org/maintainers/rails-backend

Edited by 🤖 GitLab Bot 🤖

Merge request reports