Sha256: 524ef7cda9706b51b67c0d37856ec175cf0ca25e9ddb91db4b8829816a63fdfc

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

{
  "name": "User",
  "request": {
    "headers": {
      "Content-Type": "application/json"
    },
    "http_method": "post",
    "path": "/api/users",
    "schema": {
      "$schema": "http://json-schema.org/draft-03/schema#",
      "type": "object",
      "properties": {
        "firstName": {"type": "string", "required": true},
        "lastName": {"type": "string", "required": true}
      }
    }
  },
  "response": {
    "status": 201,
    "schema": {
      "$schema": "http://json-schema.org/draft-03/schema#",
      "type": "object",
      "properties": {
        "id": { "type": "string", "required": true },
        "firstName": {"type": "string", "required": true},
        "lastName": {"type": "string", "required": true}
      }
    }
  },
  "examples": {
    "max": {
      "request": {
        "headers": {
          "Content-Type": "application/json"
        },
        "body": {
          "firstName": "Max",
          "lastName": "Lincoln"
        }
      },
      "response": {
        "body": {
          "id": "026ed411-6d12-4a76-a3c7-19758a872455",
          "firstName": "Max",
          "lastName": "Lincoln"
        }
      }
    }
  }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pacto-0.4.0.rc3 samples/contracts/user.json
pacto-0.4.0.rc2 samples/contracts/user.json