Skip to content

CQRS is broken, merging Command and Query APIs results in error duplicated mapping key #1032

@reidarsollid

Description

@reidarsollid

Expected Behavior

/api/extractor/peps:
    get:
      responses:
        '200':
          description: ''
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/Peps'
    post:
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: '#/components/schemas/Peps'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/Peps'

Actual Behavior

/api/extractor/peps:
    get:
      responses:
        '200':
          description: ''
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/Peps'
  /api/extractor/peps: # This should not be here
    post:
      requestBody:
        content:
          application/json; charset=utf-8:
            schema:
              $ref: '#/components/schemas/Peps'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json; charset=utf-8:
              schema:
                $ref: '#/components/schemas/Peps'

Steps to Reproduce the Problem

  1. Create Command API and Query API
  2. Create a POST method in Command and the same as GET in Query
  3. Validate spec and/or test Swagger UI ( only one of the methods is shown i Swagger UI, the error message is missing).

Specifications

  • Version: 5.1.5
  • Platform: All platforms
  • Subsystem: All systems

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions