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

Global configuration value not used #26

Open
smidf opened this issue Oct 8, 2020 · 0 comments
Open

Global configuration value not used #26

smidf opened this issue Oct 8, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@smidf
Copy link
Contributor

smidf commented Oct 8, 2020

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).

@smidf smidf added the bug Something isn't working label Oct 8, 2020
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

1 participant