Skip to content

[Feature Request] Add authentication options for the repository configuration of the openapitools.json #552

@FieteO

Description

@FieteO

Currently it is possible to specify downloadUrl and queryUrl in the repository configuration block if a private repository should be used:

{
    "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
    "spaces": 2,
    "generator-cli": {
        "version": "5.1.1",
        "storageDir": "./openapitools-download",
        "repository": {
            "queryUrl": "https://artifactory.mycorp.com/maven-central/select?q=g:${group.id}+AND+a:${artifact.id}&core=gav&start=0&rows=200",
            "downloadUrl": "https://artifactory.mycorp.com/maven-central/${groupId}/${artifactId}/${versionName}/${artifactId}-${versionName}.jar"
        }
    }
}

Unfortunately the artifact-storage of my organization requires login credentials and I can thus not use this option. It would be great if something like this could be added:

{
    "generator-cli": {
        "repository": {
            "queryUrl": "https://artifactory.mycorp.com/maven-central/select?q=g:${group.id}+AND+a:${artifact.id}&core=gav&start=0&rows=200",
            "downloadUrl": "https://artifactory.mycorp.com/maven-central/${groupId}/${artifactId}/${versionName}/${artifactId}-${versionName}.jar",
            "username":"",
            "password":"",
        }
    }
}

On a general note:
I think the documentation of these configuration options could be more extensive. I learned about the repository block via a comment on an issue as it is not in the README...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions