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

fix: replace "items" with "additionalProperties" #284

Merged
merged 1 commit into from
Jan 11, 2023
Merged

Conversation

Skn0tt
Copy link
Contributor

@Skn0tt Skn0tt commented Jan 11, 2023

We're currently printing the warning strict mode: missing type "array" for keyword "items" at "#/properties/function_config" (strictTypes). This PR fixes that. Apparently items is restricted to use with type: "array", the equivalent is additionalProperties: ... (which is the same as properties: { ".*": ... }.

@Skn0tt Skn0tt added the type: bug code to address defects in shipped code label Jan 11, 2023
@Skn0tt Skn0tt self-assigned this Jan 11, 2023
@Skn0tt Skn0tt marked this pull request as ready for review January 11, 2023 14:36
@Skn0tt Skn0tt requested a review from a team January 11, 2023 14:36
Copy link
Member

@eduardoboucas eduardoboucas left a comment

Choose a reason for hiding this comment

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

Looking at https://www.npmjs.com/package/ajv, are you sure it's not just properties?

@Skn0tt Skn0tt merged commit 0fc76b7 into main Jan 11, 2023
@Skn0tt Skn0tt deleted the fix-schema-warning branch January 11, 2023 14:41
@Skn0tt
Copy link
Contributor Author

Skn0tt commented Jan 11, 2023

properties requires a static list of properties, which we don't have. I tried using properties, and it results in "schema invalid".

@eduardoboucas
Copy link
Member

Ah, makes sense!

Skn0tt added a commit to netlify/build that referenced this pull request Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants