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

defined function is not registered in the core functions index #1384

Closed
iwb-rubentytgat opened this issue Oct 29, 2020 · 1 comment · Fixed by #1390
Closed

defined function is not registered in the core functions index #1384

iwb-rubentytgat opened this issue Oct 29, 2020 · 1 comment · Fixed by #1390
Assignees
Labels
t/bug Something isn't working

Comments

@iwb-rubentytgat
Copy link

iwb-rubentytgat commented Oct 29, 2020

Describe the bug
The defined function, while implemented and documented, does not appear to be registered as a core function.

To Reproduce

  1. Given any ruleset referencing the core function defined
  2. It will throw an error: Function defined not found. Called by rule foo.

Expected behavior
It should find the defined function.

Additional context
Origin of the issue is probably in this file: https://github.com/stoplightio/spectral/blob/v5.6.0/src/functions/index.ts

The defined function is not included in the CoreFunctions map, unlike all the other core functions.

@iwb-rubentytgat iwb-rubentytgat added the t/bug Something isn't working label Oct 29, 2020
@P0lip P0lip self-assigned this Nov 1, 2020
@P0lip P0lip mentioned this issue Nov 1, 2020
4 tasks
@P0lip
Copy link
Contributor

P0lip commented Nov 2, 2020

Fixed in 5.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants