Quantcast
Channel: DreamFactory Forum - Latest posts
Viewing all articles
Browse latest Browse all 5028

Creating Service Definition

$
0
0

Hi,

I am trying to setup a connection to a remote service, and have created a service definition for it:

{
	"swagger": "2.0",
	"basePath": "/pwinty",
	"info": {
		"version": "1.0.0",
		"title": "Pwinty"
	},
	"schemes": [
		"https"
	],
	"consumes": [
		"application/json"
	],
	"paths": {
		"/Country": {
			"get": {
				"summary": "List of countries",
				"description": "Gets `country` objects.\nOptional query param of **size** determines\nsize of returned array\n",
				"operationId": "getCountries",
				"responses": {
					"200": {
						"description": "Successful response",
						"schema": {
							"title": "ArrayOfCountries",
							"type": "array",
							"items": {
								"$ref": "#/definitions/county"
							}
						}
					}
				}
			}
		}
	},
	"definitions": {
		"county": {
			"type": "object",
			"properties": {
				"countryCode": {
					"type": "string"
				},
				"hasProducts": {
					"type": "boolean"
				},
				"name": {
					"type": "string"
				}
			}
		}
	}
}

the service itself is setup as a Remote Web Service with the following settings:

name: pwinty
label: pwinty
base url: https://sandbox.pwinty.com/v2.2

I would expect to go API DOCS and see a heading for "pwinty" but instead I get one called "default" with the one Get request /Country (as I would expect)

if I click "try it out" it fails as it is trying to access the service by the URL http://server_address/api/v2/Country where as I would expect it to access it via http://server_address/api/v2/pwinty/Country

Where have I gone wrong :slight_smile:


Viewing all articles
Browse latest Browse all 5028

Latest Images

Trending Articles



Latest Images