Skip to content

Share common attributes of extensions in the same class #231

Open
@3ric-T

Description

@3ric-T

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions