Remove empty string example

Remove empty string example

raml-cop says:
WARNING Can not parse JSON example: Unexpected end of JSON input

#%RAML 0.8

title: e-BookMobile API
baseUri: http://localhost:8081/{version}
version: v1

schemas:
  - book: !include book.schema
  - metadata.schema: !include raml-util/schemas/metadata.schema

/rmbtests:
  /books:
    /{bookTitle}:
    get:
      queryParameters:
        author:
          displayName: Author
          type: string
          description: An author's full name
          example: Mary Roach
          required: true
        publicationYear:
          displayName: Pub Year
          type: number
          description: The year released for the first time in the US
          example: 1984
          required: true
        rating:
          displayName: Rating
          type: number
          description: Average rating (1-5) submitted by users
          example: 3.14
          required: false
        isbn:
          displayName: ISBN
          type: string
          minLength: 10
          example: 0321736079?
      responses:
        200:
         body:
           application/json:
            schema: book
            example: |
               {
                 "data": {
                   "id": "SbBGk",
                   "title": "Stiff: The Curious Lives of Human Cadavers",
                   "description": null,
                   "datetime": 1341533193,
                   "genre": "science",
                   "author": "Mary Roach",
                   "link": "http://e-bookmobile.com/books/Stiff"
                 },
                 "success": true,
                 "status": 200
               }

    put:
      queryParameters:
        access_token:
          displayName: Access Token
          type: number
          description: Token giving you permission to make call
          required: true
    post:
      body:
        application/json:
          schema: book
      responses:
        201:
         body:
           application/json:
            example: examples/bulk.sample
         headers:
           Location:
  /test:
    post:
      body:
        application/json:
      responses:
        200:
         body:
           application/json:
        302:
          headers:
            Location:

#%RAML 0.8

title: e-BookMobile API
baseUri: http://localhost:8081/{version}
version: v1

schemas:
  - book: !include book.schema
  - metadata.schema: !include raml-util/schemas/metadata.schema

/rmbtests:
  /books:
    /{bookTitle}:
    get:
      queryParameters:
        author:
          displayName: Author
          type: string
          description: An author's full name
          example: Mary Roach
          required: true
        publicationYear:
          displayName: Pub Year
          type: number
          description: The year released for the first time in the US
          example: 1984
          required: true
        rating:
          displayName: Rating
          type: number
          description: Average rating (1-5) submitted by users
          example: 3.14
          required: false
        isbn:
          displayName: ISBN
          type: string
          minLength: 10
          example: 0321736079?
      responses:
        200:
         body:
           application/json:
            schema: book
            example: |
               {
                 "data": {
                   "id": "SbBGk",
                   "title": "Stiff: The Curious Lives of Human Cadavers",
                   "description": null,
                   "datetime": 1341533193,
                   "genre": "science",
                   "author": "Mary Roach",
                   "link": "http://e-bookmobile.com/books/Stiff"
                 },
                 "success": true,
                 "status": 200
               }

    put:
      queryParameters:
        access_token:
          displayName: Access Token
          type: number
          description: Token giving you permission to make call
          required: true
    post:
      body:
        application/json:
          schema: book
          example: ""
      responses:
        201:
         body:
           application/json:
            example: examples/bulk.sample
         headers:
           Location:
  /test:
    post:
      body:
        application/json:
      responses:
        200:
         body:
           application/json:
        302:
          headers:
            Location:


Add token auth security schema definition to raml

#%RAML 0.8
---
title: Example REST API
documentation:
  - title: Home
    content: |
      Welcome to the example API.
baseUri: http://{host}:{port}/{version}
version: v1
mediaType: application/json
protocols: [HTTP, HTTPS]
securedBy: [my_token_auth]

securitySchemes:
  my_token_auth:
    description: Authorization header token policy
    type: x-ApiKey
  my_ticket_auth:
    description: Standard Pyramid Auth Ticket policy
    type: x-Ticket
    settings:
      secret: auth_tkt_secret
      hashalg: sha512
      cookie_name: ramses_auth_tkt
      http_only: 'true'

/stories:
  displayName: Old stories
  get:
    description: Get all stories
  post:
    description: Add new story
    body:
      application/json:
        schema: !include schemas/story.json
  patch:
    description: Update multiple story
  delete:
    description: delete multiple story

  /{id}:
    displayName: One good story
    get:
      description: Get a particular story
    delete:
      description: Delete a particular story
    patch:
      description: Update a particular story

/users:
  securedBy: [auth_read]
  displayName: Good users
  get:
    description: Get all users
  post:
    description: Add new user
    body:
      application/json:
        schema: !include schemas/user.json

  /{username}:
    displayName: One good user
    get:
      description: Get a particular user
    patch:
      description: Update a particular story
    delete:
      description: Delete a particular story

    /settings:
      displayName: Old settings
      get:
        description: Get all settings
      post:
        description: Change settings

    /groups:
      displayName: Old groups
      get:
        description: Get all groups
      post:
        description: Change groups

    /profile:
      displayName: User profile
      get:
        description: Get user profile
      post:
        description: Create profile
        body:
          application/json:
            schema: !include schemas/profile.json
      put:
        description: Update profile

#%RAML 0.8
---
title: Example REST API
documentation:
  - title: Home
    content: |
      Welcome to the example API.
baseUri: http://{host}:{port}/{version}
version: v1
mediaType: application/json
protocols: [HTTP, HTTPS]
securedBy: [my_ticket_auth]

securitySchemes:
  my_ticket_auth:
    description: Standard Pyramid Auth Ticket policy
    type: x-Ticket
    settings:
      secret: auth_tkt_secret
      hashalg: sha512
      cookie_name: ramses_auth_tkt
      http_only: 'true'

/stories:
  displayName: Old stories
  get:
    description: Get all stories
  post:
    description: Add new story
    body:
      application/json:
        schema: !include schemas/story.json
  patch:
    description: Update multiple story
  delete:
    description: delete multiple story

  /{id}:
    displayName: One good story
    get:
      description: Get a particular story
    delete:
      description: Delete a particular story
    patch:
      description: Update a particular story

/users:
  securedBy: [auth_read]
  displayName: Good users
  get:
    description: Get all users
  post:
    description: Add new user
    body:
      application/json:
        schema: !include schemas/user.json

  /{username}:
    displayName: One good user
    get:
      description: Get a particular user
    patch:
      description: Update a particular story
    delete:
      description: Delete a particular story

    /settings:
      displayName: Old settings
      get:
        description: Get all settings
      post:
        description: Change settings

    /groups:
      displayName: Old groups
      get:
        description: Get all groups
      post:
        description: Change groups

    /profile:
      displayName: User profile
      get:
        description: Get user profile
      post:
        description: Create profile
        body:
          application/json:
            schema: !include schemas/profile.json
      put:
        description: Update profile


added responses info collection and collection-item types;

#%RAML 0.8
title: CPDN REST API
version: v1
baseUri: https://api.cpdn.sd2.cz/{version}
mediaType: application/json
protocols: [ HTTPS ]

resourceTypes:
  - collection:
      description: Collection of <<resourcePathName>>.
      get:
        description: Get a list of <<resourcePathName>>.
        responses:
          200:
            body:
              application/json:
                example: <<exampleCollection>>
          204:
            body:
              application/json:
                example: !include samples/status/204.sample
          400:
            body:
              application/json:
                example: !include samples/status/400.sample
          401:
            body:
              application/json:
                example: !include samples/status/401.sample
          403:
            body:
              application/json:
                example: !include samples/status/403.sample
          404:
            body:
              application/json:
                example: !include samples/status/404.sample
          405:
            body:
              application/json:
                example: !include samples/status/405.sample
          409:
            body:
              application/json:
                example: !include samples/status/409.sample
          410:
            body:
              application/json:
                example: !include samples/status/410.sample
          500:
            body:
              application/json:
                example: !include samples/status/500.sample
          503:
            body:
              application/json:
                example: !include samples/status/503.sample
      post:
        description: |
          Add a new <<resourcePathName>>.
        body:
          application/json:
        responses:
          201:
            body:
              application/json:
                example: !include samples/status/201.sample
          400:
            body:
              application/json:
                example: !include samples/status/400.sample
          401:
            body:
              application/json:
                example: !include samples/status/401.sample
          403:
            body:
              application/json:
                example: !include samples/status/403.sample
          404:
            body:
              application/json:
                example: !include samples/status/404.sample
          405:
            body:
              application/json:
                example: !include samples/status/405.sample
          409:
            body:
              application/json:
                example: !include samples/status/409.sample
          410:
            body:
              application/json:
                example: !include samples/status/410.sample
          500:
            body:
              application/json:
                example: !include samples/status/500.sample
          503:
            body:
              application/json:
                example: !include samples/status/503.sample
  - collection-item:
      description: Entity representing a <<resourcePathName|!singularize>>
      get:
        description: |
          Get the collection item of <<resourcePathName|!singularize>>
        responses:
          200:
            body:
              application/json:
                example: <<exampleItem>>
          204:
            body:
              application/json:
                example: !include samples/status/204.sample
          400:
            body:
              application/json:
                example: !include samples/status/400.sample
          401:
            body:
              application/json:
                example: !include samples/status/401.sample
          403:
            body:
              application/json:
                example: !include samples/status/403.sample
          404:
            body:
              application/json:
                example: !include samples/status/404.sample
          405:
            body:
              application/json:
                example: !include samples/status/405.sample
          409:
            body:
              application/json:
                example: !include samples/status/409.sample
          410:
            body:
              application/json:
                example: !include samples/status/410.sample
          500:
            body:
              application/json:
                example: !include samples/status/500.sample
          503:
            body:
              application/json:
                example: !include samples/status/503.sample
      post:
        description: |
          Update the collection item of <<resourcePathName|!singularize>>
        responses:
          200:
            body:
              application/json:
                example: !include samples/status/200.sample
          304:
            body:
              application/json:
                example: !include samples/status/304.sample
          400:
            body:
              application/json:
                example: !include samples/status/400.sample
          401:
            body:
              application/json:
                example: !include samples/status/401.sample
          403:
            body:
              application/json:
                example: !include samples/status/403.sample
          404:
            body:
              application/json:
                example: !include samples/status/404.sample
          405:
            body:
              application/json:
                example: !include samples/status/405.sample
          409:
            body:
              application/json:
                example: !include samples/status/409.sample
          410:
            body:
              application/json:
                example: !include samples/status/410.sample
          500:
            body:
              application/json:
                example: !include samples/status/500.sample
          503:
            body:
              application/json:
                example: !include samples/status/503.sample
      delete:
        description: |
          Delete the collection item of <<resourcePathName|!singularize>>
        responses:
          200:
            body:
              application/json:
                example: !include samples/status/200.sample
          400:
            body:
              application/json:
                example: !include samples/status/400.sample
          401:
            body:
              application/json:
                example: !include samples/status/401.sample
          403:
            body:
              application/json:
                example: !include samples/status/403.sample
          404:
            body:
              application/json:
                example: !include samples/status/404.sample
          405:
            body:
              application/json:
                example: !include samples/status/405.sample
          409:
            body:
              application/json:
                example: !include samples/status/409.sample
          410:
            body:
              application/json:
                example: !include samples/status/410.sample
          500:
            body:
              application/json:
                example: !include samples/status/500.sample
          503:
            body:
              application/json:
                example: !include samples/status/503.sample

/schemes:
  description: Scheme root resource
  get:
    description: List of Schemes
  /{scheme_id}:
    get:
      description: Get one entity of Scheme identified by SCHEME_ID
    /nodes:
    /sections:
    /requests:
    /mapPoints:
    /permissions:

/nodes:
  description: Node root resource
  type:
    collection:
      exampleCollection: !include samples/nodes.sample
  /{node_id}:
    type:
        collection-item:
          exampleItem: !include samples/node.sample
    /calc:
      type:
        collection-item:
          exampleItem: !include samples/node-calc.sample
    /mapPoint:
      type:
        collection-item:
          exampleItem: !include samples/node-mapPoint.sample
    /scheme:
      type:
        collection-item:
          exampleItem: !include samples/node-scheme.sample
    /spec:
      type:
        collection-item:
          exampleItem: !include samples/node-spec.sample

/sections:
  description: Section root resource
  /{section_id}:
    /calc:
    /nodes:
    /paths:
    /scheme:
    /spec:

/mapPoints:
  description: MapPoint root resource
  /{mapPoint_id}:
    /node:
    /paths:
      /src:
      /dst:
    /scheme:

/paths:
  description: Path root resource
  /{path_id}:
    /section:

/permissions:
  description: Schema permissions root resource

#%RAML 0.8
title: CPDN REST API
version: v1
baseUri: https://api.cpdn.sd2.cz/{version}
mediaType: application/json
protocols: [ HTTPS ]

resourceTypes:
  - readOnlyCollection:
      description: ReadOnly collection of <<resourcePathName>>.
      get:
        description: Get a list of <<resourcePathName>>.
        responses:
          200:
            body:
              application/json:
                example: |
                  <<exampleCollection>>
  - collection:
      description: Collection of <<resourcePathName>>.
      get:
        description: Get a list of <<resourcePathName>>.
        responses:
          200:
            body:
              application/json:
                example: |
                  <<exampleCollection>>
      post:
        description: |
          Add a new <<resourcePathName|!singularize>>.
        body:
          application/json:
        responses:
          200:
            body:
              application/json:
                example: |
                  { "message": "The <<resourcePathName|!singularize>> has been properly entered" }
  - collection-item:
      description: Entity representing a <<resourcePathName|!singularize>>
      get:
        description: |
          Get the collection item of <<resourcePathName|!singularize>>
        responses:
          200:
            body:
              application/json:
                example: <<exampleItem>>
          404:
            body:
              application/json:
                example: !include samples/4xx.sample

/schemes:
  description: Scheme root resource
  get:
    description: List of Schemes
  /{scheme_id}:
    get:
      description: Get one entity of Scheme identified by SCHEME_ID
    /nodes:
    /sections:
    /requests:
    /mapPoints:
    /permissions:

/nodes:
  description: Node root resource
  type:
    collection:
      exampleCollection: !include samples/nodes.sample
  /{node_id}:
    type:
        collection-item:
          exampleItem: !include samples/node.sample
    /calc:
      type:
        collection-item:
          exampleItem: !include samples/node-calc.sample
    /mapPoint:
      type:
        collection-item:
          exampleItem: !include samples/node-mapPoint.sample
    /scheme:
      type:
        collection-item:
          exampleItem: !include samples/node-scheme.sample
    /spec:
      type:
        collection-item:
          exampleItem: !include samples/node-spec.sample

/sections:
  description: Section root resource
  get:
  /{section_id}:
    /calc:
    /nodes:
    /spec:

/mapPoints:
  description: MapPoint root resource
  get:
  /{mapPoint_id}:
    /node:
    /paths:
      /src:
      /dst:

/paths:
  description: Path root resource
  get:
  /{path_id}:
    /section:


[#6797] fix indentation, so not all nested under has_access

#%RAML 0.8
---
title: Apache Allura
version: 1
baseUri: https://{domain}/rest
securedBy: [null, oauth_1_0, oauth_bearer_token]

resourceTypes: !include resourceTypes.yaml
traits: !include traits.yaml
securitySchemes: !include securitySchemes.yaml

baseUriParameters:
  domain:
    description: "The website domain"
    example: "forge-allura.apache.org"
    default: "forge-allura.apache.org"

/{neighborhood}:
    description: |
      Neighborhoods are groups of logically related projects, which have the same default options.

    uriParameters:
      neighborhood:
        example: p
        description: |
          Allura has two default neighborhoods: **“Projects”** `/p` and **“Users”** `/u`.
          More information can be found [here](https://forge-allura.apache.org/docs/getting_started/using.html?highlight=neighborhood#what-are-neighborhoods)

    /has_access:
      type: permission
      get:
        queryParameters:
          perm:
            displayName: Permission
            required: true
            type: string
            example: create
            default: read
            enum: [read, admin, create, update, register]

    /{project}:
      description: |
        Get or modify existing projects.
      uriParameters:
        project:
          description: The Project short name.
          example: "allura"
          pattern: ([a-zA-Z]+)

      type: {
          project: {
          schema: !include schemas/project.json,
          example: !include examples/project.json
          }
        }

      /has_access:
        type: permission
        get:
          queryParameters:
            perm:
              displayName: Permission
              required: true
              type: string
              example: create
              default: read
              enum: [read, admin, create, update]

      /{link}:
        description: |
          Represents the External Link tool.
        type: {
            tool: {
            example: !include examples/link.json,
            schema: !include schemas/link.json
            }
          }

        get:
          description: |
            Returns the existing url.

        post:
          description: |
            Updates the url. *authentication required*.
          body:
            application/x-www-form-urlencoded:
              formParameters:
                url:
                  description: |
                    The url you would like to update to.
                  type: string
                  example: http://google.com

      /{blog}:
        type: {
            tool: {
            example: !include examples/blog.json,
            schema: !include schemas/blog.json
            }
          }
        description: |
          Represents the **Blog tool**

        displayName: Blog
        uriParameters:
         blog:
           displayName: Blog Name
           type: string
           example: blog

        get:
          description: |
            Returns a list of posts, including title and API url.
          responses:
            200:
              body:
                application/json:
                  schema: !include schemas/blog.json
                  example: !include examples/blog.json
        post:
          description: |
            Creates a new blog post.
          body:
            application/x-www-form-urlencoded:
              formParameters:
                title:
                  description: |
                    The title of the post.
                  type: string
                  example: New API docs released!
                text:
                  description: |
                    The text of the post.
                  type: string
                  example: Lots of text here describing apis!\nThat is all.
                labels:
                  description: |
                    Labels of the post -- comma seperated strings
                  type: string
                  example: api,development
                state:
                  description: |
                    Draft or published.
                  enum: [draft, published]
                  type: string
                  example: published

        /{year}/{month}/{title}:
            description: Represents a blog post entry.
            type: {
              tool: {
              example: !include examples/blogPost.json,
              schema: !include schemas/blogPost.json
              }
            }
            displayName: Blog Post
            uriParameters:
             year:
               displayName: Year
               type: number
               example: 2015
             month:
               displayName: Month
               type: number
               example: 04
             title:
               displayName: Title
               type: string
               example: project-insights

            post:
              description: |
                Updates an existing blog post.
              body:
                application/x-www-form-urlencoded:
                  formParameters:
                    title:
                      description: |
                        The title of the post.
                      type: string
                    text:
                      description: |
                        The text of the post.
                      type: string
                    labels:
                      description: |
                        Labels of the post -- comma seperated strings
                      type: string
                    state:
                      description: |
                        Draft or published.
                      enum: [draft, published]
                      type: string

        /has_access:
          type: permission
          get:
            queryParameters:
              perm:
                displayName: Permission
                required: true
                type: string
                example: post
                default: read
                enum: [admin, configure, moderate, post, unmoderated_post, read, write]

      /{forum}:
        description: |
          A list of forums
        type: {
            tool: {
            example: !include examples/page.json,
            schema: !include schemas/page.json
            }
          }

        displayName: forum
        uriParameters:
         forum:
           displayName: Forum Name
           type: string
           example: general
           description: |
             Returns a list of forums, including name, description, num_posts, API URL, and last_post details

             To view more than 100 threads, or 100 posts in a thread, use the pagination support of the API by adding ?page=1 etc. to the URL.

        /forum:
          description: |
            returns a limited list of topics in the forum, with fields for subject, num_replies, API URL, and last_post
          get:
          /{slug}:
            description: |
              returns a limited list of posts in the thread, with fields for author, text, and timestamp. Nested posts (i.e. a reply to a post) can be determined by the slug structure. For example, "slug": "0a0b/9f00" is a reply to the post with "slug": "0a0b"
            get:

        /has_access:
          type: permission
          get:
            queryParameters:
              perm:
                displayName: Permission
                required: true
                type: string
                example: post
                default: read
                enum: [admin, configure, moderate, post, unmoderated_post, read]

      /{discussion}:
        description: |
          Represents the **Discussion Tool**.
        type: {
            tool: {
            schema: !include schemas/discussion.json,
            example: !include examples/discussion.json

            }
          }

        displayName: Discussion
        uriParameters:
         discussion:
           displayName: Discussion Name
           type: string
           example: "discussion"

        /{forum}:
          type: {
              tool: {
                example: !include examples/page.json,
                schema: !include schemas/page.json
              }
            }

          displayName: forum
          uriParameters:
           forum:
             displayName: Forum Name
             type: string
             example: general

        /has_access:
          type: permission

      /{wiki}:
        description: |
          Represents the **Wiki Tool**.
        type: {
            tool: {
            example: !include examples/wiki.json,
            schema: !include schemas/wiki.json
            }
          }

        displayName: Wiki
        uriParameters:
         wiki:
           displayName: Wiki Name
           type: string
           example: wiki

        /{title}:
          type: {
              tool: {
              example: !include examples/page.json,
              schema: !include schemas/page.json
              }
            }

          displayName: Title
          uriParameters:
           title:
             displayName: Wiki Title
             type: string
             example: Extensions
          get:
            description: |
              returns a JSON representation of a page
          post:
            description: |
              Creates or updates the titled page.
            body:
              application/x-www-form-urlencoded:
                formParameters:
                  text:
                    description: |
                      Page text.
                    type: string
                  labels:
                    description: |
                     Comma-separated list of page labels.
                    type: string

        /has_access:
          type: permission
          get:
            queryParameters:
              perm:
                displayName: Permission
                required: true
                type: string
                example: post
                default: read
                enum: [admin, configure, moderate, post, unmoderated_post, read, create, delete, edit]

      /{tracker}:
        description: |
          Represents the **Ticket Tracker Tool**.
        type: {
            tool: {
            example: !include examples/tickets.json,
            schema: !include schemas/ticket.json
            }
          }
        is: [pageable]

        displayName: Tracker Url
        uriParameters:
         tracker:
           displayName: Tracker Name
           type: string
           example: tickets

        get:
          is: [pageable]
          description: |
            Get a list of tickets

        /_discuss/thread/{threadId}:
          uriParameters:
           threadId:
             displayName: Thread ID
             type: string
             example: f78b98a0

          get:
            description: |
              returns summary information about a thread, including the posts in a thread
          /{slug}:
            uriParameters:
             slug:
               displayName: Slug
               type: string
               example: 9133
            get:
              description: |
                returns detailed information about a post
            /reply:
              description: |
                create a threaded reply to the given post
              post:
                body:
                  application/x-www-form-urlencoded:
                    formParameters:
                      text:
                        description: the text of the reply
                        example: |
                          I *agree* with you.
                        required: true
                        type: string
          /new:
            description: |
              create a post in the given thread
            post:
              body:
                application/x-www-form-urlencoded:
                  formParameters:
                    text:
                      description: The text of the new post
                      example: |
                        This is a new post!
                      required: true
                      type: string

        /search:
          type: {
            searchableCollection: {
            queryParamName: q,
            schema: !include schemas/searchedTickets.json,
            example: !include examples/searchedTickets.json
            }
          }
          is: [ pageable]

        /new:
          description: |
            Creates a new ticket.
          post:
            body:
              # FIXME?
              application/x-www-form-urlencoded:
                formParameters:
                  access_token:
                    description: "The access token provided by the authentication application"
                    required: true
                    type: string
                  ticket_form.summary:
                    description: Ticket title
                    type: string
                    required: false
                  ticket_form.description:
                    description: ticket description
                    type: string
                    required: false
                  ticket_form.assigned_to::
                    type: string
                    required: false
                    description: username of ticket assignee
                  ticket_form.labels:
                    type: string
                    required: false
                    description:  comma-separated list of ticket labels
                  ticket_form.attachment:
                    type: file
                    description:  (optional) attachment
                    required: false
                  ticket_form.custom field name:
                    description:  custom field value
                    type: string
                    required: false

        /{ticketNumber}:
          type: {
            tool: {
            example: !include examples/ticket.json,
            schema: !include schemas/ticket.json

            }
          }
          displayName: Ticket Number
          uriParameters:
            ticketNumber:
              example: 1
              description: |
                Get a details of a ticket.

          /save:
            description: |
              updates an existing ticket
              parameters are the same as /rest/p/project_name/mount_point/new

            post:
              body:
                # form?
                application/x-www-form-urlencoded:
                  formParameters:
                    access_token:
                      description: "The access token provided by the authentication application"
                      required: true
                      type: string
                    ticket_form.summary:
                      description: Ticket title
                      type: string
                      required: false
                    ticket_form.description:
                      description: ticket description
                      type: string
                      required: false
                    ticket_form.assigned_to::
                      type: string
                      required: false
                      description: username of ticket assignee
                    ticket_form.labels:
                      type: string
                      required: false
                      description:  comma-separated list of ticket labels
                    ticket_form.attachment:
                      type: file
                      description:  (optional) attachment
                      required: false
                    ticket_form.custom field name:
                      description:  custom field value
                      type: string
                      required: false

        /has_access:
          type: permission
          get:
            queryParameters:
              perm:
                displayName: Permission
                required: true
                type: string
                example: post
                default: read
                enum: [admin, configure, moderate, post, unmoderated_post, read, create, delete, update, save_searches]

      /admin:
        description: |
          Endpoints for **project exporting** and managing **webhooks**

        /export:
          description: |
            Generates a full bulk export of your tool(s) in the same format as the API for individual access. Authentication required. Here is an [example shell](https://forge-allura.apache.org/p/allura/git/ci/master/tree/scripts/project_export) script using these APIs, suitable to run as a cron job.
          post:
            description: |
              Submits an export job

              **400 Bad Request:** tools parameter not provided or is invalid
              **503 Service Unavailable:** an export job is already running
              **200 OK:** job submitted. Body will be: *{"status": "in progress", "filename": FILENAME}*
        /export_status:
          description: |
            Check status of a bulk export job
          get:
            description: |
              Returns status: busy or ready

        /{project}/webhooks:
            type: {
              typedCollection: {
              example: !include examples/webhooks.json,
              schema: !include schemas/webhook.json
              }
            }
            description: |
              This is to manage webhooks programatically. See the [Webhook docs](https://forge-allura.apache.org/p/allura/wiki/Webhooks/) for more information.

              The webhook payloads and signature verification method are documented at https://forge-allura.apache.org/p/allura/wiki/Webhooks/

            /{type}:
              uriParameters:
                type:
                  example: repo-push
                  enum: [repo-push]
                  description: |
                    Allura supports one type of webhook for the moment - repo-push, triggered when a repository receives new commits. It is supported for Git, Mercurial and SVN repositories.
              post:
                description: |
                  Create a new webhook.
                body:
                  application/x-www-form-urlencoded:
                    formParameters:
                      url:
                        description: |
                          The url to call when the the webhook is triggered.
                        required: true
                        type: string
              /{id}:
                uriParameters:
                  id:
                    type: string
                    description: |
                      Unique identifier for a webhook.

                get:
                  description: |
                    View a webhook
                post:
                  description: |
                    Update an existing webhook
                  body:
                    application/x-www-form-urlencoded:
                      formParameters:
                        url:
                          description: |
                            The url to call when the the webhook is triggered.
                          required: true
                          type: string
                        secret:
                          description: |
                            Optionally supply your own secret.

                            Note: DO NOT ever expose your secret!
                          required: false
                          type: string
                delete:
                  description: |
                    Delete an existing webhook
        /install_tool:
          description: |
            Adds a new tool to the project. *Authentication Required*.

            returns dict with two fields:
            success: False if error is occurred, otherwise True
            info: success or error message
          post:
            body:
              application/x-www-form-urlencoded:
                formParameters:
                  tool:
                    description: Tool name that you want to install.
                    example: tickets
                    enum: [tickets, link, git, svn, mercurial, blog, discussion, subproject, wiki]
                    required: true
                    type: string
                  mount_point:
                    description: |
                      The section of the url relitive to your project. For example: /p/your_project/{mount_point}
                    example: git
                    type: string
                    required: true
                  mount_label:
                    description: |
                      How your tool will be displayed in your project (like a "nice name" for the tool).
                    example: Git
                    type: string
                    required: true
                  order:
                    type: string
                    enum: [first, last, alpha_tool]
                    required: false
                    description: |
                      "first", "last", or "alpha_tool" for position with respect to existing tools (or existing tools of the same type for "alpha_tool")

/u/{username}:
    description: |
      Represents a user (returns a project-like response).

      Most often you'll use the /profile suffix to return user data.
    type: {
      tool:{
        example: !include examples/user.json,
        schema: !include schemas/user.json
      }
    }
    /profile:
      description: |
        A user profile
      type: {
        tool:{
        example: !include examples/userProfile.json,
        schema: !include schemas/userProfile.json
        }
      }