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

feat: serve a JSON schema from website #14792

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Dec 28, 2023

Summary

I have zero clue if this is gonna work or not 😅 If it does work though, this closes #11963

Test plan

Verify deployment preview

Copy link

netlify bot commented Dec 28, 2023

Deploy Preview for jestjs failed.

Name Link
🔨 Latest commit 2390d46
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/660598f43b54ec0008fca072

@@ -226,129 +226,145 @@ const RawHasteConfig = Type.Partial(
);

export const RawInitialOptions = Type.Partial(
Type.Object({
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore whitespace (https://github.com/jestjs/jest/pull/14792/files?w=1) - I just added some meta properties at the end

@@ -51,6 +52,7 @@
"@crowdin/cli": "^3.5.2",
"@docusaurus/module-type-aliases": "^3.0.0",
"@docusaurus/tsconfig": "^3.0.0",
"@jest/schemas": "workspace:*",
Copy link
Member Author

@SimenB SimenB Dec 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add "@jest/schemas-30x": "npm:@jest/schemas@^30" etc later for different versions

@SimenB
Copy link
Member Author

SimenB commented Dec 28, 2023

I'm not allowed to see the logs of the (currently failing) deployment 🙈

@mrazauskas
Copy link
Contributor

Perhaps it would make sense to add schema URI to documentation? I mean, simply to use it in the JSON config example:

{
  "$schema": "https://jestjs.io/schema.json"
  "bail": 1,
  "verbose": true
}

@mrazauskas
Copy link
Contributor

Just to add, some time ago I was playing with typescript-json-schema. It was able to take a plain TS interface and emit schema. All options of istanbul-reports were included in the schema. Or at least it seemed so. To make sure, I went on writing tests for the schema. That was overwhelming amount of work and this is where I gave up (;

@SimenB
Copy link
Member Author

SimenB commented Dec 29, 2023

Perhaps it would make sense to add schema URI to documentation? I mean, simply to use it in the JSON config example:

{
  "$schema": "https://jestjs.io/schema.json"
  "bail": 1,
  "verbose": true
}

I think $schema is supposed to be the version of the JSON schema spec it's following?

I added a self link in https://github.com/jestjs/jest/pull/14792/files#diff-cf140d6648a6d236a6a5ce32888aa504827a65dd89139174ec30e7da8db128a4R23

Copy link

This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Mar 28, 2024
@SimenB SimenB added Pinned and removed Stale labels Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Create Schema for JSON and YAML Config Files
2 participants