Product-apim: Tingkatkan definisi OAS untuk mendukung Micro GW

Dibuat pada 7 Okt 2019  ·  11Komentar  ·  Sumber: wso2/product-apim

Saat ini atribut khusus berikut adalah dukungan dalam definisi OAS. Harap tinjau dan sarankan jika ada yang perlu diperbaiki.

x-wso2-auth-header: "Authorization"
x-throttling-tier: "Unlimited"
x-wso2-cors:
corsConfigurationEnabled: false
accessControlAllowOrigins:
- "*"
accessControlAllowCredentials: false
accessControlAllowHeaders:
- "authorization"
- "Access-Control-Allow-Origin"
- "Content-Type"
- "SOAPAction"
accessControlAllowMethods:
- "GET"
- "PUT"
- "POST"
- "DELETE"
- "PATCH"
- "OPTIONS"
x-wso2-production-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
x-wso2-sandbox-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
x-wso2-basePath: "/sample/1.0.0"
x-wso2-transports:
- "http"
- "https"

Untuk setiap jenis endpoint, konfigurasinya adalah sebagai berikut.

HTTP
x-wso2-production-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
x-wso2-sandbox-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"

Kegagalan HTTP
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
endpoint_config: "failover"
x-wso2-sandbox-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
endpoint_config: "failover"

Saldo beban HTTP
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
endpoint_config: "load_balance"
x-wso2-sandbox-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
endpoint_config: "load_balance"

SABUN MANDI
x-wso2-production-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"
x-wso2-sandbox-endpoints:
url: "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"

Penyelesaian SOAP
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"
endpoint_config: "failover"
x-wso2-sandbox-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"
endpoint_config: "failover"

Keseimbangan beban sabun
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"
endpoint_config: "load_balance"
x-wso2-sandbox-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "address"
endpoint_config: "load_balance"

Titik akhir default
x-wso2-production-endpoints:
endpoint_type: "default"
x-wso2-sandbox-endpoints:
endpoint_type: "default"

Semua 11 komentar

Bisakah kita mengubah
endpoint_type: "http" -> ketik: "http"

Perlu x-wso2-disable-security untuk menonaktifkan keamanan sumber daya https://github.com/wso2/product-microgateway#microgateway -supported-open-api-extensions

Perlu berubah
url -> url

x-throttling-tier: "Tidak Terbatas"
Ini harus menjadi x-wso2-throttling-tier

apakah titik akhir tunggal atau tidak, itu harus berupa array.
url: "https://localhost:9443/publisher/apis/create/rest" ->
url:

HTTP failover
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
endpoint_type: "http"
endpoint_config: "failover"

perlu diubah menjadi

HTTP failover
x-wso2-production-endpoints:
url:
- "https://localhost:9443/publisher/apis/create/rest"
- "https://localhost:9443/publisher/apis/create/rest"
type: "failover"

Sama halnya dengan titik akhir keseimbangan beban

Perlu x-wso2-disable-security untuk menonaktifkan keamanan sumber daya https://github.com/wso2/product-microgateway#microgateway -supported-open-api-extensions

@praminda Informasi ini sudah ada di bawah nama 'x-auth-type". Bisakah kita menggunakannya kembali?

x-throttling-tier: "Tidak Terbatas"
Ini harus menjadi x-wso2-throttling-tier

@hasuniea Informasi ini sudah ada dengan nama 'x-throttling-tier'. Bisakah kita melanjutkannya? jika tidak, akan ada duplikat informasi di angkuh.

x-throttling-tier

Saat ini micro gateway mendukung x-throttling-tier, oleh karena itu merupakan duplikasi data, saya berasumsi kita dapat menyimpannya apa adanya

x-auth-type

Ya, kami dapat menggunakan ekstensi ini, karena kami mendukungnya di MGW

Masalah ini telah diperbaiki. Oleh karena itu penutupan.

Apakah halaman ini membantu?
0 / 5 - 0 peringkat