title: OpenAPI pathvariables are null when GET-ing the endpoint
body: <p>I'm trying to implement a Rest endpoint using swagger and yaml files. Below you can see the generated interface:</p>
  <pre><code>public interface MyInterface {
  
      @ApiOperation(value = &quot;Get Customers&quot;, nickname = &quot;getCustomers&quot;, notes = &quot;&quot;, response = Customers.class, tags = {
                  &quot;Customers })
                  @ApiResponses(value = {
                      @ApiResponse(code = 200, message = &quot;A Customers object.&quot;, response = Customers.class),
                      @ApiResponse(code = 400, message = &quot;Bad request (parameter error)&quot;, response = Error.class),
                      @ApiResponse(code = 403, message = &quot;Forbidden access (restricted to admins and the authenticated user only)&quot;, response = Error.class),
                      @ApiResponse(code = 404, message = &quot;Customers referred not found&quot;, response = Error.class),
                      @ApiResponse(code = 500, message = &quot;unexpected error&quot;, response = Error.class)
                  })
                  @RequestMapping(value = &quot;/api/{supplierId}/customer/{quoteId}/{collectionId}&quot;,
                      produces = {
                          &quot;application/json&quot;
                      },
                      method = RequestMethod.GET)
                  ResponseEntity &lt; Customers &gt; getCustomers(
                      @ApiParam(value = &quot;The ID of the supplier (not supplier code)&quot;, required = true) @PathVariable(&quot;supplierId&quot;) Integer supplierId,
                      @ApiParam(value = &quot;The ID of quote object&quot;, required = true) @PathVariable(&quot;quoteId&quot;) Integer quoteId,
                      @ApiParam(value = &quot;The ID of collection within the quote&quot;, required = true) @PathVariable(&quot;collectionId&quot;) Integer collectionId,
                      @ApiParam(value = &quot;The ID of the language&quot;, required = true, defaultValue = &quot;en&quot;) @PathVariable(&quot;language&quot;) String language,
                      @NotNull @ApiParam(value = &quot;The ID of the customer&quot;, required = true) @Valid @RequestParam(value = &quot;customerId&quot;, required = true) String customerId);
  
  }
  
  @RestController
  public MyImplementation implements MyInterface {
  
      @Override
      public ResponseEntity &lt; Customers &gt; getCustomers(Integer supplierId, Integer quoteId, Integer collectionId, String language, String customerId) {
          return new ResponseEntity(HttpStatus.NOT_IMPLEMENTED);
      }
  }
  </code></pre>
  <p>When I send a Get request to my endpoint like that:</p>
  <pre><code>localhost:8080/api/212/customer/300/222?customerId=940
  </code></pre>
  <p>all the <code>@PathVariable</code>s are null (<code>supplierId</code>, <code>collectionId</code>, ...). Only the <code>@RequestParam</code> <code>customerId</code> is populated. What could be the problem here?</p>
  <p><a href="https://i.stack.imgur.com/2oDHP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2oDHP.png" alt="enter image description here" /></a></p>
  <p><strong>Edit 1:</strong> Here's the yaml-file:</p>
  <pre><code>openapi: &quot;3.0.0&quot;
  info:
    version: 1.0.0
    title: Customer Actions
    description: API related to RfQ actions
  servers:
    - url: http://localhost:8080/MyDomain
      description: Local development
  paths: 
    /api/{supplierId}/rfq/{quoteId}/{collectionId}:
      get:
        summary: Get Customers
        operationId: getCustomers
        tags:
          - Suppliers
        parameters:
          - name: supplierId
            in: path
            required: true
            description: The ID of the supplier (not supplier code)
            schema:
              type: integer
          - name: quoteId
            in: path
            required: true
            description: The ID of quote object
            schema:
              type: integer
          - name: collectionId
            in: path
            required: true
            description: The ID of collection within the quote
            schema:
              type: integer
          - name: language
            in: query
            required: true
            description: The ID of the language
            schema:
              type: string
              default: en
          - name: customerId
            in: query
            required: true
            description: The ID of the customer
            schema:
              type: string
        responses:
          200:
            description: A Customers object.
            content:
              application/json:
                schema:
                  type: Customers
          400:
            $ref: &quot;#/components/responses/400&quot;
          403:
            $ref: &quot;#/components/responses/403&quot;
          404:
            $ref: &quot;#/components/responses/404&quot;
          500:
            $ref: &quot;#/components/responses/500&quot;
  </code></pre>
  <p><strong>Edit 2:</strong> I have found a solution to my problem. What I did was I added the method signature (variables) annotation from the interface to the implementation method. Now my values are populated. However, as I understand it based on <a href="https://www.baeldung.com/spring-interface-driven-controllers" rel="nofollow noreferrer">this link</a>, this information should be automatically available at the implementation.</p>
  <pre><code>    @Override        
      public ResponseEntity&lt;FileDetails&gt; getQuoteRateItems(
              @PathVariable(&quot;supplierId&quot;) String supplierId,
              @PathVariable(&quot;quoteId&quot;) String quoteId,
              @PathVariable(&quot;collectionId&quot;) String collectionId,
              @RequestParam(value = &quot;customerId&quot;, required = true) String customerId,
              @RequestParam(value = &quot;language&quot;, required = false, defaultValue=&quot;en&quot;) String language) {
          return new ResponseEntity(HttpStatus.NOT_IMPLEMENTED);
  </code></pre>
  <p>Is that the normal procedure that I have to annotate this stuff twice? Because it violates the DRY principle.</p>