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

info.licenseUrl is null or missing? #34

Open
cartley opened this issue Dec 15, 2020 · 3 comments
Open

info.licenseUrl is null or missing? #34

cartley opened this issue Dec 15, 2020 · 3 comments

Comments

@cartley
Copy link

cartley commented Dec 15, 2020

I get this error that info.licenseUrl has evaluated to null or missing. Where am I supposed to set it, and to what? I tried defining it as Java property, so far no luck.

[ERROR] Failed to execute goal com.webcohesion.enunciate:enunciate-maven-plugin:2.12.1:docs (default-cli) on project com.foo.bar.baz: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:
[ERROR] ==> info.licenseUrl  [in template "jar:file:/home/cartley/.m2/repository/dk/jyskebank/tooling/enunciate/enunciate-openapi/1.1.5/enunciate-openapi-1.1.5.jar!/dk/jyskebank/tools/enunciate/modules/openapi/openapi.fmt" at line 41, column 12]
[ERROR] 
[ERROR] ----
[ERROR] Tip: It's the step after the last dot that caused this error, not those before it.
[ERROR] ----
[ERROR] Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use [#if myOptionalVar??]when-present[#else]when-missing[/#if]. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
[ERROR] ----
[ERROR] 
[ERROR] ----
[ERROR] FTL stack trace ("~" means nesting-related):
[ERROR]         - Failed at: ${info.licenseUrl}  [in template "jar:file:/home/cartley/.m2/repository/dk/jyskebank/tooling/enunciate/enunciate-openapi/1.1.5/enunciate-openapi-1.1.5.jar!/dk/jyskebank/tools/enunciate/modules/openapi/openapi.fmt" at line 41, column 10]
[ERROR]         - Reached through: @file name="openapi.yml" charset="utf-8"  [in template "jar:file:/home/cartley/.m2/repository/dk/jyskebank/tooling/enunciate/enunciate-openapi/1.1.5/enunciate-openapi-1.1.5.jar!/dk/jyskebank/tools/enunciate/modules/openapi/openapi.fmt" at line 19, column 1]
[ERROR] ----
@stoicflame
Copy link
Owner

I'm afraid I don't know gradle, so I don't know. I'm happy to review and merge a pull request if you can figure it out.

@cartley
Copy link
Author

cartley commented Dec 15, 2020

It's actually maven, but same difference. I've tried a few different versions of enunciate and enunciate-openapi as well as the config file settings. I'll be sure to let you know if I figure it out.

@nfalco79
Copy link

i have the same issue with maven.
The issue is that it use the maven license url information and when is not available it fails.
Workaround is set in maven pom.xml something like this:

<licenses>
    <license>
        <url>https://opensource.org/licenses/MIT</url>
    </license>
</licenses>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants