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

Share common attributes of extensions in the same class #231

Open
3ric-T opened this issue Mar 9, 2023 · 0 comments
Open

Share common attributes of extensions in the same class #231

3ric-T opened this issue Mar 9, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@3ric-T
Copy link

3ric-T commented Mar 9, 2023

When using all three extensions porvided by this plugin, configuration often looks like:

openapi {
    title = project.name
    description = project.description.toString()
    version = project.version.toString()
    format = "yaml"
}

openapi3 {
    title = project.name
    description = project.description.toString()
    version = project.version.toString()
    format = "yaml"
}

postman {
    title = project.name
    description = project.description.toString()
    version = project.version.toString()
}

As openapi and openapi3 share the same base class, above code could be factorized:

configure( listOf( openapi, openapi3 )) {
    title = project.name
    description = project.description.toString()
    version = project.version.toString()
    format = "yaml"
}

But unfortunately it cannot be applied to postman extension.

It should be useful that all those three extensions share their common attributes in the same class, in order to ease the configuration step.

@ozscheyge ozscheyge added the enhancement New feature or request label Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants