Skip to content

Commit

Permalink
Swagger specification and examples for Service Fabric Mesh 2018-09-01…
Browse files Browse the repository at this point in the history
…-preview release.
  • Loading branch information
vipul-modi committed Oct 19, 2018
1 parent 835770d commit 26f08b0
Show file tree
Hide file tree
Showing 39 changed files with 5,589 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"operationId": "Application_Create",
"description": "This example shows how to create or update a application resource.",
"parameters": {
"api-version": "2018-09-01-privatepreview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "sbz_demo",
"applicationResourceName": "sampleApplication",
"applicationResourceDescription": {
"properties": {
"description": "Service Fabric Mesh sample application.",
"services": [
{
"name": "helloWorldService",
"properties": {
"description": "SeaBreeze Hello World Service.",
"osType": "Linux",
"codePackages": [
{
"name": "helloWorldCode",
"image": "seabreeze/sbz-helloworld:1.0-alpine",
"endpoints": [
{
"name": "helloWorldListener",
"port": 80
}
],
"resources": {
"requests": {
"memoryInGB": 1,
"cpu": 1
}
}
}
],
"networkRefs": [
{
"name": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/sampleNetwork",
"endpointRefs": [
{
"name": "helloWorldListener"
}
]
}
],
"replicaCount": 1
}
}
]
},
"tags": {},
"location": "EastUS"
}
},
"responses": {
"200": {
"body": {
"type": "Microsoft.ServiceFabricMesh/applications",
"location": "EastUS",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication",
"name": "sampleApplication",
"tags": {},
"properties": {
"provisioningState": "Succeeded",
"description": "Service Fabric Mesh sample application.",
"serviceNames": [
"helloWorldService"
],
"healthState": "Ok",
"status": "Ready"
}
}
},
"201": {
"body": {
"type": "Microsoft.ServiceFabricMesh/applications",
"location": "EastUS",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication",
"name": "sampleApplication",
"tags": {},
"properties": {
"provisioningState": "Updating",
"description": "Service Fabric Mesh sample application.",
"serviceNames": [
"helloWorldService"
],
"healthState": "Unknown",
"status": "Creating"
}
}
},
"202": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"operationId": "Application_Delete",
"description": "This example shows how to delete an existing application resource. If the application resource exists and is deleted successfully, an empty response with 200 status code is returned. If the application resource does not exit, an empty response with 204 status code is returned.",
"parameters": {
"api-version": "2018-09-01-privatepreview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "sbz_demo",
"applicationResourceName": "sampleApplication"
},
"responses": {
"200": {},
"202": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"operationId": "Application_Get",
"description": "This example shows how to get a application resource. If the application resource exists, its description is returned along with an OK (200) status code. If the application resource does not exist, an error is returned with an appropriate status code.",
"parameters": {
"api-version": "2018-09-01-privatepreview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "sbz_demo",
"applicationResourceName": "sampleApplication"
},
"responses": {
"200": {
"body": {
"type": "Microsoft.ServiceFabricMesh/applications",
"location": "EastUS",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication",
"name": "sampleApplication",
"tags": {},
"properties": {
"provisioningState": "Succeeded",
"description": "Service Fabric Mesh sample application.",
"healthState": "Ok",
"serviceNames": [
"helloWorldService"
],
"status": "Ready"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"operationId": "Application_ListByResourceGroup",
"description": "This example shows how to list all application resources within a specified resource group.",
"parameters": {
"api-version": "2018-09-01-privatepreview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "sbz_demo"
},
"responses": {
"200": {
"body": {
"value": [
{
"type": "Microsoft.ServiceFabricMesh/applications",
"location": "EastUS",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication",
"name": "sampleApplication",
"tags": {},
"properties": {
"provisioningState": "Succeeded",
"description": "Service Fabric Mesh sample application.",
"healthState": "Ok",
"serviceNames": [
"helloWorldService"
],
"status": "Ready"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"operationId": "Application_ListBySubscriptionId",
"description": "This example shows how to list all application resources for a specified subscription.",
"parameters": {
"api-version": "2018-09-01-privatepreview",
"subscriptionId": "00000000-0000-0000-0000-000000000000"
},
"responses": {
"200": {
"body": {
"value": [
{
"type": "Microsoft.ServiceFabricMesh/applications",
"location": "EastUS",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication",
"name": "sampleApplication",
"tags": {},
"properties": {
"provisioningState": "Succeeded",
"description": "Service Fabric Mesh sample application.",
"healthState": "Ok",
"serviceNames": [
"helloWorldService"
],
"status": "Ready"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"operationId": "Service_Get",
"description": "This example shows how to get a service resource for a given application. If the service resource exists, its description is returned along with an OK (200) status code. If the service resource does not exist, an error is returned with an appropriate status code.",
"parameters": {
"api-version": "2018-09-01-privatepreview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "sbz_demo",
"applicationResourceName": "sampleApplication",
"serviceResourceName": "helloWorldService"
},
"responses": {
"200": {
"body": {
"name": "helloWorldService",
"type": "Microsoft.ServiceFabricMesh/services",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication/services/helloWorldService",
"properties": {
"description": "SeaBreeze Hello World Service.",
"osType": "Linux",
"codePackages": [
{
"name": "helloWorldCode",
"image": "seabreeze/sbz-helloworld:1.0-alpine",
"endpoints": [
{
"name": "helloWorldListener",
"port": 80
}
],
"resources": {
"requests": {
"memoryInGB": 1,
"cpu": 1
}
}
}
],
"networkRefs": [
{
"name": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/sampleNetwork",
"endpointRefs": [
{
"name": "helloWorldListener"
}
]
}
],
"replicaCount": 1,
"healthState": "Ok",
"status": "Ready"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"operationId": "Service_List",
"description": "This example shows how to list all services of a given application.",
"parameters": {
"api-version": "2018-09-01-privatepreview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "sbz_demo",
"applicationResourceName": "sampleApplication"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "helloWorldService",
"type": "Microsoft.ServiceFabricMesh/services",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication/services/helloWorldService",
"properties": {
"description": "SeaBreeze Hello World Service.",
"osType": "Linux",
"codePackages": [
{
"name": "helloWorldCode",
"image": "seabreeze/sbz-helloworld:1.0-alpine",
"endpoints": [
{
"name": "helloWorldListener",
"port": 80
}
],
"resources": {
"requests": {
"memoryInGB": 1,
"cpu": 1
}
}
}
],
"networkRefs": [
{
"name": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/sampleNetwork",
"endpointRefs": [
{
"name": "helloWorldListener"
}
]
}
],
"replicaCount": 1,
"healthState": "Ok",
"status": "Ready"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"operationId": "CodePackage_GetContainerLogs",
"description": "This example shows how to get logs from the container of service replica. If the container exists, the logs are returned with an OK (200) status code, otherwise an error is returned with an appropriate status code.",
"parameters": {
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "sbz_demo",
"api-version": "6.4-preview",
"applicationResourceName": "sbzDocApp",
"serviceResourceName": "sbzDocService",
"replicaName": "0",
"codePackageName": "sbzDocCode"
},
"responses": {
"200": {
"body": {
"content": " * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)\n * Downloading style https://assets-cdn.github.com/assets/frameworks-8f281eb0a8d2308ceb36e714ba3c3aec.css\n * Downloading style https://assets-cdn.github.com/assets/github-a698da0d53574b056d3c79ac732d4a70.css\n * Downloading style https://assets-cdn.github.com/assets/site-83dc1f7ebc9c7461fe1eab799b56c4c4.css\n * Cached all downloads in /root/.grip/cache-4.5.2\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET / HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET /__/grip/asset/frameworks-8f281eb0a8d2308ceb36e714ba3c3aec.css HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET /__/grip/asset/site-83dc1f7ebc9c7461fe1eab799b56c4c4.css HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET /__/grip/asset/github-a698da0d53574b056d3c79ac732d4a70.css HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET /__/grip/static/octicons/octicons.css HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:03] \"GET /__/grip/static/octicons/octicons.woff2?ef21c39f0ca9b1b5116e5eb7ac5eabe6 HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:03] \"GET /__/grip/static/favicon.ico HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:05] \"GET /seabreeze-index.md HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:09] \"GET /seabreeze-api-application_get.md HTTP/1.1\" 200 -\n"
}
}
}
}
Loading

0 comments on commit 26f08b0

Please sign in to comment.