Skip to content

Update --cli-schema output for consistency #49500

@baronfel

Description

@baronfel

@baronfel

stylistic changes:

  • don't emit null values
  • don't emit empty nesting objects/maps
  • add an order property to arguments
  1. I intentionally emitted null values as that represents a certain state. This is something that you can declare in a JSON schema.
  2. I intentionally emitted empty collections/objects as we don't have a published schema and this JSON document is not being sent between a client/server. You want the structure to remain a constant so deserialization by tooling and consistency on understanding by AI would be easier since the data is more patterned if everything is always emitted.
  3. In the future, let's make arguments an array so the order is preserved that way. That's a fairly easy fix.

Originally posted by @MiYanni in #49118 (comment)

Looking at this list, the one that most impacts consumers of the JSON is the 3rd one - we should make that change before 10 GA for sure. The other two changes can definitely also happen, but they're not as structurally-impactful as #3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions