Skip to content

Discuss: CLI Configuration JSON Schema and option discovery #10271

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

Closed
hansl opened this issue Apr 10, 2018 · 4 comments · Fixed by #10269
Closed

Discuss: CLI Configuration JSON Schema and option discovery #10271

hansl opened this issue Apr 10, 2018 · 4 comments · Fixed by #10269
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Milestone

Comments

@hansl
Copy link
Contributor

hansl commented Apr 10, 2018

We can use enums and anyOf for validating properly, but editors might not be show completion properly.

@hansl hansl added the 6.0.0-rc label Apr 10, 2018
@hansl
Copy link
Contributor Author

hansl commented Apr 10, 2018

Having a schema => Markdown transformer would help. Better to have good doc than good completion.

@clydin
Copy link
Member

clydin commented Apr 10, 2018

Proof of concept schema fragment:

    "test": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "not": { "enum": [ "pancake", "waffle" ] }
            },
            "options": { "type": "object" }
          }
        },
        {
          "type": "object",
          "properties": {
            "name": { "const": "pancake" },
            "options": {
              "type": "object",
              "properties": {
                "x": { "type": "number" },
                "y": { "type": "number" }
              },
              "additionalProperties": false
            }
          },
        },
        {
          "type": "object",
          "properties": {
            "name": { "const": "waffle" },
            "options": {
              "type": "object",
              "properties": {
                "a": {"type":"string"},
                "b": {"type":"boolean"}
              },
              "additionalProperties": false
            }
          }
        }
      ]
    }

@hansl hansl added this to the v6.0.0 milestone Apr 12, 2018
@hansl hansl added severity3: broken P5 The team acknowledges the request but does not plan to address it, it remains open for discussion P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed 6.0.0-rc severity3: broken P5 The team acknowledges the request but does not plan to address it, it remains open for discussion labels Apr 12, 2018
@hansl
Copy link
Contributor Author

hansl commented Apr 12, 2018

Two things;

  1. This should be a wiki document that contains enough information that people can refer to.
  2. This is not a blocking issue for 6.0; the $schema property should point to a url on a server that we can update easily. This should be at (tentative) http://angular.io/schemas/angular.json/6.0.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
@clydin clydin removed their assignment Jun 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants