望ましい行動APIをapimanでローカルにテストするには?
私はapiman-quickstarts/echo-serviceの応答を表示するために、ローカルapimanのAPIをテストしたい(つまりapimanの最新バージョンではもはや適用された場合や、任意のエコー応答は素晴らしいことないだろう)。私はthe official apiman siteから、以下のものを使用してUbuntu 17.10
にapiman
をインストール
を試してみた何
:
mkdir ~/apiman-1.3.1.Final
cd ~/apiman-1.3.1.Final
curl http://download.jboss.org/wildfly/10.1.0.Final/wildfly-10.1.0.Final.zip -o wildfly-10.1.0.Final.zip
curl http://downloads.jboss.org/apiman/1.3.1.Final/apiman-distro-wildfly10-1.3.1.Final-overlay.zip -o apiman-distro-wildfly10-1.3.1.Final-overlay.zip
unzip wildfly-10.1.0.Final.zip
unzip -o apiman-distro-wildfly10-1.3.1.Final-overlay.zip -d wildfly-10.1.0.Final
cd wildfly-10.1.0.Final
./bin/standalone.sh -c standalone-apiman.xml
apimanのGUI(localhost:8080/apimanui/api-manager
)を使用して、私は、とPublic API
をOrganisation
を作成no API Security
、Endpoint
を任意にhttp://localhost:8080/apiman-echo
と定義し、Client App
とする。 APIはPublic
と定義されているため、をClient App
に定義する必要はありません。 としてGUIで提供されたAPIのManaged Endpoint
:
https://localhost:8443/apiman-gateway/MyTestOrganisation/MyTestAPI/2.0
実際の動作
これらはカールの結果、次のとおりです。
# using the 'managed endpoint' provided in the gui - https
curl -k https://localhost:8443/apiman-gateway/MyTestOrganisation/MyTestAPI/2.0
<html><head><title>Error</title></head><body>404 - Not Found</body></html>
# using the 'managed endpoint' provided in the gui - http
curl -k http://localhost:8443/apiman-gateway/MyTestOrganisation/MyTestAPI/2.0
curl: (52) Empty reply from server
#using the endpoint i defined
curl -k http://localhost:8080/apiman-echo
<html><head><title>Error</title></head><body>404 - Not Found</body></html>
クラッシュコースのドキュメント(apiman.io/latest/crash-course.htmlが)と述べています以下はapimanフォルダの内容ですが、私のPCのwildfly-10.1.0.Final
フォルダのquickstarts
を検索すると結果は返されません:
├── apiman
│ ├── data
│ │ ├── all-policyDefs.json
│ │ └── apiman-realm.json
│ ├── ddls
│ │ ├── apiman_mysql5.ddl
│ │ └── apiman_postgresql9.ddl
│ ├── quickstarts
│ │ ├── echo-service
│ │ ├── LICENSE
│ │ ├── pom.xml
│ │ └── README.md
│ └── sample-configs
│ ├── apiman-ds_mysql.xml
│ └── apiman-ds_postgresql.xml
私はecho-service
「をインストール」およびテストが利用できるようにするために関連しているどこかの手順のカップルをしないのですような気がします。
apiman.gitbooks.io/apiman-user-guideにecho
の検索とapiman.gitbooks.io/apiman-production-guideはapiman.io/latest/developer-guide.html状態ながら、何の結果を生成しません:
the mock back-end API is a simple "echo" API that responds to all requests with a JSON payload describing the request it received
をしかし、私は解釈し、その情報を利用する方法がわからないです。