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

Generator JSON schema app/lib: tags not of type array #9055

Closed
TomONeill opened this issue Feb 21, 2022 · 3 comments
Closed

Generator JSON schema app/lib: tags not of type array #9055

TomONeill opened this issue Feb 21, 2022 · 3 comments

Comments

@TomONeill
Copy link

TomONeill commented Feb 21, 2022

Hello, I am trying to add a JSON schema to my VSCode settings (json.schemas) so that the project.json files will be typed and Intellisense works.

Referencing https://raw.githubusercontent.com/nrwl/nx/master/packages/next/src/generators/application/schema.json works, except the tags array gives me a warning: Incorrect type. Expected "string".

I think that's because of the following:

"tags": {
"type": "string",
"description": "Add tags to the application (used for linting)",
"alias": "t"
},

"tags": {
"type": "string",
"description": "Add tags to the library (used for linting).",
"alias": "t"
},

Is it possible to change that into an array? Or is there another way to make the schema work?

Edit:
And while I'm at it, is there a schema.json available for nx.json that I can use?

@TomONeill
Copy link
Author

Related: #2299

@FrozenPandaz
Copy link
Collaborator

FrozenPandaz commented Mar 14, 2022

https://raw.githubusercontent.com/nrwl/nx/master/packages/next/src/generators/application/schema.json should not be the schema of project.json.

The schema of project.json is not easily expressed as a single schema.json file. But we do have a VS Code extension that provides this schema with intellisense for project.json and more :)

https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console

Does that work for you?

@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

2 participants