You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defmoduleCore.JSONSchema.CVSSdorequireExonerateExonerate.function_from_string(:def,:validate_cvss_3_0,""" ... contents here ... """)end
$ mix compile
Compiling 1 file (.ex)
error: undefined functionhttps://www.first.org/cvss/cvss-v3.0.json#/definitions/scoreType/minimum/2 (expected Core.JSONSchema.CVSS to define such a functionorfor it to be imported, but none are available)
│
613 │ Exonerate.function_from_string(:def, :validate_cvss_3_0, """ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ └─ lib/etc/json_schema/cvss.ex:613: Core.JSONSchema.CVSS."https://www.first.org/cvss/cvss-v3.0.json#/definitions/scoreType"/2 error: undefined function https://www.first.org/cvss/cvss-v3.0.json#/definitions/scoreType/maximum/2 (expected Core.JSONSchema.CVSS to define such a function or for it to be imported, but none are available) │ 613 │ Exonerate.function_from_string(:def, :validate_cvss_3_0, """
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
│
└─ lib/etc/json_schema/cvss.ex:613: Core.JSONSchema.CVSS."https://www.first.org/cvss/cvss-v3.0.json#/definitions/scoreType"/2
The generated code when using the dump: true option shows the following (both float and integer variants):
There are no functions generated named: https___www.first.org_cvss_cvss_v3.0.jsonat_definitions_scoreType_minimum or https___www.first.org_cvss_cvss_v3.0.jsonat_definitions_scoreType_maximum however there are functions entrypoint_at_definitions_scoreType_minimum and entrypoint_at_definitions_scoreType_maximum which indicates a problem prefixing the id on the function names.
If I remove the following "id: " line from the schema document string then it compiles successfully.
Versions
I am attempting to use Exonerate 1.1.3, with Elixir 1.17.2 OTP-27
mix.exs:
The problem
Consider the schema at https://www.first.org/cvss/cvss-v3.0.json
When attempting to create a validation function:
The generated code when using the
dump: true
option shows the following (both float and integer variants):There are no functions generated named:
https___www.first.org_cvss_cvss_v3.0.jsonat_definitions_scoreType_minimum
orhttps___www.first.org_cvss_cvss_v3.0.jsonat_definitions_scoreType_maximum
however there are functionsentrypoint_at_definitions_scoreType_minimum
andentrypoint_at_definitions_scoreType_maximum
which indicates a problem prefixing the id on the function names.If I remove the following "id: " line from the schema document string then it compiles successfully.
Some questions
Thanks.
The text was updated successfully, but these errors were encountered: