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

openapi3 task null exception #251

Closed
jjunhwan-kim opened this issue Oct 18, 2023 · 1 comment
Closed

openapi3 task null exception #251

jjunhwan-kim opened this issue Oct 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jjunhwan-kim
Copy link

Hi.

I use com.epages.restdocs-api-spec version 0.18.4.

recently I updated that library to version 0.19.0.

then when I execute command ./gradlew openapi3

there was an error like

> Task :openapi3 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':openapi3'.
> Cannot invoke "io.swagger.v3.oas.models.media.Schema.getTitle()" because the return value of "java.util.Map$Entry.getValue()" is null

What did I do wrong?

Thank you.

@Jinwook94
Copy link

Jinwook94 commented Oct 21, 2023

I'm facing the same issue.

I was using version 0.19.0, and it worked well for a few days without any problems.
However, starting from today, I'm suddenly experiencing errors.
There were no code changes, but an error began occurring during the build.

Error: Cannot invoke "io.swagger.v3.oas.models. media.Schema.getTitle)" because the return value of "java.util.Map$ Entry.get Value 0" is null

image


build.gradle

plugins {
    id 'org.springframework.boot' version '3.1.4'
    id 'io.spring.dependency-management' version '1.1.3'
    id 'com.epages.restdocs-api-spec' version '0.18.4'
    id 'java'
}

dependencies {
  ...
  testImplementation 'com.epages:restdocs-api-spec-mockmvc:0.18.4'
  ...
    }
    
openapi3 {
    servers = [
            {
                url = "https://staging.api.bootme.co.kr"
                description = "staging"
            },
            {
                url = "http://localhost:8080"
                description = "local"
            }
    ]
    title = 'BootMe API'
    description 'BootMe API'
    version = '0.0.1'
    format = 'json'
    contact = {
        name = 'Kim'
        email = '94@gmail.com'
    }
    separatePublicApi = false
    outputDirectory = "src/main/resources/static/docs/swagger/open-api-spec"
    outputFileNamePrefix = 'open-api-3.0.1'
}

Test code

Thanks,

@wodrobina wodrobina added the bug Something isn't working label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants