[Question] How to not include "Managed" gateway by default when publishing APIs
- Vorherrschende Sprache
- C#
- Sterne
- 448
- Forks
- 247
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### Release version
v5.1.1
### Question Details
Our APIM solely uses self-hosted gateways and thus does not require every API to be assigned to the "Managed" gateway.
However, even though the API is only assigned to a specific self-hosted gateway, the "Managed" gateway is still getting assigned to it.
I added a "Managed" gateway into the `gateways` directory and set the APIs to an empty array.
However, this only works when not using the commit id during publishing, as the Managed gateway file is not changed when I add a new API.
How is this supposed to be handled?
### Expected behavior
"Managed" gateway is not assigned whenever I assign it to some custom gateways.
### Actual behavior
"Managed" gateway is always assigned to new APIs.
### Reproduction Steps
Create a fresh API and assign it to a custom gateway (not the "Managed" one)
Folder structure:

Content of `gateways/self-hosted/apis.json`
```
[
{
"name": "my-new-api"
}
]
```
Content of `gateways/Managed/apis.json`
```
[]
```
Since the `gateways/Managed/apis.json` has not been touched/changed during the commit, the publisher does not update the Managed gateway assignment, so the new API is actually having both the "Managed" and "self-hosted" gateways assigned to it.
Beitragsleitfaden
Rechercherichtung
Beginne mit gateways/self-hosted/apis.json und gateways/Managed/apis.json und verfolge dann das Verhalten des Publishers beim Veröffentlichen mit einer Commit-ID. Reproduziere die Zuweisung mit einer neuen API und einem benutzerdefinierten Gateway. Erledigt ist die Aufgabe, wenn eine neu zugewiesene API nicht ebenfalls Managed zugewiesen wird, wenn ihre Managed-Gateway-Datei unverändert ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- azure
- Bereich
- api, cloud
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100