title: AWS API Gateway changes OAS3 path and query parameter types to string
body: <p>When creating an API Gateway using an <code>OAS3</code> definition, the path and query parameter types get changed to strings. I can't find any AWS documentation stating the expected behavior or why this is. I know when configuring the API Gateway manually it doesn't expose a <code>type</code> for path/query variables, but is there a way to get API Gateway to keep the  <code>OAS3</code> path/query parameter type for documentation sake?</p>
  
  <p>We're trying to use the Serverless Developer Portal to host our API documentation and we need to expose the correct parameter types; e.g. for a <code>limit</code> query parameter we need it to display as an <code>integer</code>.</p>
  
  <p>Here's a SAM for a basic example. The path parameter <code>param</code> is an <code>integer</code> and the swagger generated documentation displays it correctly, however API Gateway changes it to a <code>string</code> and the generated documentation shows it as a <code>string</code>:</p>
  
  <pre><code>AWSTemplateFormatVersion: '2010-09-09'
  Transform: AWS::Serverless-2016-10-31
  Resources:
    ComplexityScoreProxy:
      Type: AWS::Serverless::Api
      Properties:
        StageName: dev
        DefinitionBody:
          openapi: 3.0.1
          info:
            version: "1"
            title: Aws API Gateway Boolean Test
          paths:
            /{param}:
              get:
                x-amazon-apigateway-integration:
                  type: http_proxy
                  uri: https://example.com
                  httpMethod: GET
                  responses:
                    "200":
                      statusCode: 200
                parameters:
                  - name: param
                    in: path
                    required: true
                    schema:
                      type: integer
                responses:
                  "200":
                    description: OK
  
  </code></pre>
  
  <p>Put the SAM in tempalte.yaml and run cloudformation to deploy:</p>
  
  <pre><code>aws cloudformation deploy --template-file template.yaml --stack-name boolean-test
  </code></pre>
  
  <p>Get the ID</p>
  
  <pre><code>aws apigateway get-rest-apis --query "items[?name=='Aws API Gateway Boolean Test'].id"
  </code></pre>
  
  <p>Retrieve the OAS replacing the <code>--rest-api-id</code> with the correct id:</p>
  
  <pre><code>aws apigateway get-export --parameters extensions='apigateway' --rest-api-id XXXXXXXXXX --stage-name dev --export-type swagger latestoas.json
  </code></pre>
  
  <p>The exported OAS3 definition shows the parameter as a string:</p>
  
  <pre><code> "paths" : {
      "/{param}" : {
        "get" : {
          "parameters" : [ {
            "name" : "param",
            "in" : "path",
            "required" : true,
            "schema" : {
              "type" : "string"
            }
          } ],
  </code></pre>
  
  <p>Also, viewing the generated swagger documentation in the Serverless Developer Portal displays the <code>param</code> as a <code>string</code>.</p>