Skip to content

Global configuration value not used #26

@smidf

Description

@smidf

Follow the configuration (dateLibrary):

configure<SwaggerCodeGenConfig> {
   ...
    setAdditionalProperties(
        mutableMapOf(
            "dateLibrary" to "string",  // <-- global value
            ...
        )
    )

    configs =
        listOf(
            SwaggerCodeGenTaskConfig(
                inputFileName = "GetAccountedTransactionListMa.yaml",
                outputFolderName = "movements",
                additionalProperties = mapOf(
                    ...
                )
            ),
            SwaggerCodeGenTaskConfig(
                inputFileName = "GetContentMa.yaml",
                outputFolderName = "content",
                additionalProperties = mapOf(
                    ...
                )
            ),
            SwaggerCodeGenTaskConfig(
                inputFileName = "GetIconsMa.yaml",
                outputFolderName = "icons",
                additionalProperties = mapOf(
                    "dateLibrary" to "java8", // <-- not use global value
                    ...
                )
            ),
            SwaggerCodeGenTaskConfig(
                inputFileName = "GetGlobalSettingsMa.yaml",
                outputFolderName = "global-settings",
                additionalProperties = mapOf(
                    ...
                )
            ),
            SwaggerCodeGenTaskConfig(
                inputFileName = "ExecuteInteractBatchMa.yaml",
                outputFolderName = "execute-interact-batch",
                additionalProperties = mapOf(
                    ...
                )
            ),
            SwaggerCodeGenTaskConfig(
                inputFileName = "GetCstInfoMa.yaml",
                outputFolderName = "cst-info",
                additionalProperties = mapOf(
                    ...
                )
            ),
            SwaggerCodeGenTaskConfig(
                inputFileName = "GetResourceMessagesMa.yaml",
                outputFolderName = "resource-messages",
                additionalProperties = mapOf(
                    ...
                )
            ),
            SwaggerCodeGenTaskConfig(
                inputFileName = "GetAccountListMa.yaml",
                outputFolderName = "account-list",
                additionalProperties = mapOf(
                    ...
                )
            ),
            SwaggerCodeGenTaskConfig(
                inputFileName = "GetMtbAccountListMa.yaml",
                outputFolderName = "mtb-account-list",
                additionalProperties = mapOf(
                    "dateLibrary" to "string", // <-- MUST be added
                    ...
                )
            ),
            SwaggerCodeGenTaskConfig(
                inputFileName = "GetMtbClientMa.yaml",
                outputFolderName = "mtb-client",
                additionalProperties = mapOf(
                    ...
                )
            ),
           ...
        )
}

In the configuration, you see that the global configuration value needs to be redefined as a local value. It is likely that the previous configuration value will be used as a local value in the next configuration (lexicographically according to the specification file).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions