# Service Definition examples don't work

**URL:** <https://community.dreamfactory.com/t/service-definition-examples-dont-work/4989>\
**Category:** uncategorized\
**Created:** [July 12, 2019, 6:46pm UTC](https://community.dreamfactory.com/t/service-definition-examples-dont-work/4989 "2019-07-12T18:46:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sman](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@sman](https://community.dreamfactory.com/u/sman)\
**Post date:** [July 12, 2019, 6:46pm UTC](https://community.dreamfactory.com/t/service-definition-examples-dont-work/4989/1 "2019-07-12T18:46:19Z")

</div>

Trying to get a basic service definition working. This is a slimmed down Twilio example that dreamfactory makes available. Tested it on [http://editor.swagger.io/](http://editor.swagger.io/) which found some errors I had to change but still not working. You guys should update these examples so that they actually work.

```
{
"swagger": "2.0",
"info": {
	"title": "Twilio Account API",
	"description": "Twilio is a cloud communications Infrastructure as a Service(IaaS) company based in San Francisco, California. Twilio allows software developers to programmatically make and receive phone calls and send and receive text messages using its web service APIs. Twilio's services are accessed over HTTP and are billed based on usage.",
	"termsOfService": "https://www.twilio.com/legal/tos",
	"version": "2010-04-01"
},
"host": "api.twilio.com",
"basePath": "/2010-04-01",
"schemes": [
	"https"
],
"produces": [
	"application/json"
],
"consumes": [
	"application/json"
],
"paths": {
	"/{AccountSid}.{format}": {
		"get": {
			"summary": "Get Account",
			"description": "GetAccount",
			"operationId": "getaccount",
			"parameters": [
				{
				  "required": true,
					"in": "path",
					"name": "AccountSid",
					"type": "string"
				},
				{
				  "required": true,
					"in": "path",
					"name": "format",
					"type": "string"
				}
			],
			"responses": {
				"200": {
					"description": "OK"
				}
			},
		}
	}
},
"definitions": {}

```

}

---

<div class="post-metadata">

**Author:** ![sman](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@sman](https://community.dreamfactory.com/u/sman)\
**Post date:** [July 12, 2019, 8:35pm UTC](https://community.dreamfactory.com/t/service-definition-examples-dont-work/4989/2 "2019-07-12T20:35:34Z")

</div>

For anyone else having problems with this. When using parameters, you need to define type as schema.

So instead of

```
  "type": "string"

```

You do

```
"schema": {
    "type": "string"
}

```

It would have saved me a few hours if these examples provided by dreamfactory were updated so that they actually work.

> **[dreamfactorysoftware/df-service-apis](https://github.com/dreamfactorysoftware/df-service-apis)**
>
> DreamFactory-tested HTTP services and definitions. - dreamfactorysoftware/df-service-apis
