Skip to content

Impossible to export yaml files when there are several groups #76

Closed
@benfonty

Description

@benfonty

Hello, I am trying to export several groups in yaml format.

Here is my plugin configuration:

openApi {
    outputDir.set(file("$buildDir/docs"))
    groupedApiMappings.set(["http://localhost:8080/xxx/v3/api-docs.yaml/XXX public API": "openapi-xxx-public-api.yaml",
                            "http://localhost:8080/xxx/v3/api-docs.yaml/XXX admin API": "openapi-xxx-admin-api.yaml"])
    waitTimeInSeconds.set(100)
    bootRun {
        jvmArgs = ["-Dspring.profiles.active=openapigeneration"]
    }
}

I got an error: > Expected a com.google.gson.JsonObject but was com.google.gson.JsonPrimitive

I presume this is because of val isYaml = url.toLowerCase().matches(Regex(".+[./]yaml$")) which doesn't work when using groupedApiMappings because of the format of the urls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions