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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include shema reference in configuration files #8574

Closed
HuiiBuh opened this issue Jan 18, 2022 · 2 comments · Fixed by #10228
Closed

Include shema reference in configuration files #8574

HuiiBuh opened this issue Jan 18, 2022 · 2 comments · Fixed by #10228

Comments

@HuiiBuh
Copy link

HuiiBuh commented Jan 18, 2022

Description

Currently the configuration files are not easy to use. There is no way for me to know if the key I just entered is a valid one.

Motivation

I currently have to look in the documentation as soon as I want to know what keys are necessary/allowed in the different configuration files (nx.json, workspace.json, project.json). Unfortunately the documentation for these files is not that easy to find and does not describe framework specific stuff well enough. For example how would I define that every component should use the on push change detection strategy. Can this be done globally in the nx.json, or do I have to set this in the project.json files of the apps/libs?

Suggested Implementation

If you would link you json schema files which describe the different files like Angular does it would be much easier to navigate these files. I don't know when I last took a look at the angular documentation, because my IDE already tells me the most important things.

@vsavkin vsavkin added the scope: misc Misc issues label Jan 20, 2022
@erdysson
Copy link

erdysson commented Feb 1, 2022

I also am having difficulties with it, I convinced my team to work with nx and now they all are complaining about not knowing which keys and values they can use in project.json. Hopefully done soon

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

Successfully merging a pull request may close this issue.

3 participants