Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: implement json schema for workspace.json/provide docs #2299

Closed
Hotell opened this issue Jan 10, 2020 · 12 comments
Closed

core: implement json schema for workspace.json/provide docs #2299

Hotell opened this issue Jan 10, 2020 · 12 comments

Comments

@Hotell
Copy link
Contributor

Hotell commented Jan 10, 2020

Current Behavior

Currently there are no proper api docs regarding workspace.json config.
Also there is deviation between web/react nx cli guides, as for web there is a commented section because of missing component schematic 馃槄(https://github.com/nrwl/nx/blob/master/docs/web/guides/cli.md)

Feature request:

  • It would be nice to have similar docs like angular cli has
  • ship JSON schema for workspace (proper intellisense and source of truth for docs)
@FrozenPandaz
Copy link
Collaborator

Hi, sorry about this.

This was mislabeled as stale. We are testing ways to mark not reproducible issues as stale so that we can focus on actionable items but our initial experiment was too broad and unintentionally labeled this issue as stale.

@sushruth
Copy link
Contributor

sushruth commented Jun 8, 2020

Also would be nice to have the same for nx.json as well.

@n0mer
Copy link
Contributor

n0mer commented Jan 10, 2021

JSON Schema would speed up nrwl adoption , lower learning curve - please dedicate attention to this issue.

@JoshHubi
Copy link

JoshHubi commented Mar 17, 2021

Any update on this? I still face issues with fully understanding what this configuration file can and can't do.

@xudre
Copy link

xudre commented Aug 25, 2021

Up, would be a good addition to the tooling.

@muuvmuuv
Copy link
Contributor

What a shame, I thought this is already been done... I would have had expected this to exist since this quote kind of implies it "Nx helps architect, test, and build at any scale".

@edbzn
Copy link
Contributor

edbzn commented Sep 30, 2021

@muuvmuuv Open a PR to match your profile description.

@puku0x
Copy link
Contributor

puku0x commented Dec 5, 2021

Nx Console supports JSON schema for workspace.json/angular.json and project.json.

For nx.json, it is in progress馃殌

@puku0x
Copy link
Contributor

puku0x commented Dec 11, 2021

Nx Console v17.13.0 has been released. It supports JSON schemas for workspace.json, project.json and nx.json.
https://github.com/nrwl/nx-console/releases/tag/v17.13.0

@AndyClausen
Copy link
Contributor

Nx Console supports JSON schema for workspace.json/angular.json and project.json.

That's great, but JetBrains users have been left behind. I wish they'd just ship nx with these schemas.

@AgentEnder
Copy link
Member

For a small bit more clarity as to the why schema defenitions are shipped as part of the nx-console extension, consider the options block on executors. Nx console is able to dynamically provide a schema such that those are validated, whereas in Nx those would be untyped.

We can still ship a minimal schema, and perhaps we should, but the console extension will continue to override that schema in vscode.

nartc added a commit that referenced this issue May 10, 2022
#10228)

* feat(core): add nx.json, workspace.json, and project.json JSON schemas

ISSUES CLOSED: #8574, #2299

* fix(core): add ajv to test generated config files based on JSON schema

* fix(core): only add $schema to project.json if it is standalone and in create mode

* feat(core): add migration to add json schema to config files for 14.2.0

* fix(core): adjust schemas

* chore(core): adjust tests across repo to adhere to JSON schema if generated

* fix(core): construct the json schema object instead of using a boolean flag

* chore(core): add ajv tests for workspacejson and nxjson

* chore(core): remove unnecessary standalone check
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests