Make it easy to use with a private maven repository
@kay-schecker ci sta già lavorando.
Dal 16/10/2024.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Hello,
I am using the openapi-generator-cli 2.14.0 with a private maven repository (requiring authentication).
Atm using this cli with this setup involves a few steps and makes it feel a bit quirky.
I was wondering if it's possible make the whole process smoother:
- fix NO_PROXY handling
- easier authentication to private maven repositories (no credentials hardcoded in the openapitools.json)
Steps to follow to use the openapi-generator-cli with a private maven repository
Here are the steps I needed to follow to make the openapi-generator-cli work in my corporate environment.
Please note: I am used to have HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment vars setup.
The NO_PROXY is set in order to avoid internal http calls to be sent via the proxy.
-
First run: I get a 503 (returned by my http proxy)
Ok, this is the issue https://github.com/OpenAPITools/openapi-generator-cli/issues/652
Fix: I remove all HTTP_PROXY, HTTPS_PROXY -
Second run: I get a unable to get local issuer certificate.
Ok, this is related to https://github.com/OpenAPITools/openapi-generator-cli/issues/130#issuecomment-737277129
Fix: I add NODE_TLS_REJECT_UNAUTHORIZED=0 as environment variable -
Third run: Request failed with status code 401 (returned by my private maven repository)
Fix: I hardcode my user/pwd credentials in my openapitools.json.
I am not too happy with this solution since I'll need to do some pre-processing to be able to others dev in my team to use their credentials (or for the ci to run):{ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { "version": "7.9.0", "repository": { "downloadUrl": "https://myuser:mypassword@my.corporate.maven.repo.com/repository/mvn-proxy-group/${groupId}/${artifactId}/${versionName}/${artifactId}-${versionName}.jar" } } }
- Lingua principale
- TypeScript
- Stelle
- 2k
- Fork
- 208
- Merge medio
- 7h 12m
- PR unite (30g)
- 6
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenAPITools/openapi-generator-cli
-
[FEATURE] consider using caret ranges instead of pinned exact versions for runtime dependencies Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
bug
OpenAPITools/openapi-generator-cli#1213 · 1 assegnatario ·
-
bug
OpenAPITools/openapi-generator-cli#1190 · 1 assegnatario ·
-
bug
OpenAPITools/openapi-generator-cli#1138 · 1 commento · 1 assegnatario ·
-
bug
OpenAPITools/openapi-generator-cli#1094 · 1 commento · 1 assegnatario ·
Tutte le issue di OpenAPITools/openapi-generator-cli
Issue simili
-
Type/Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenNSW/nsw-srilanka#497 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
0xMiden/bridge-portal#132 ·
-
react-doctor severity:warning tech-debt
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
digidem/comapeo-cloud-app#403 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100