Skip to content

The pattern instead of the example is used in the request body  #41

@DotnDev

Description

@DotnDev

If the following schema is defined:

    Base64PersonalDocument:
      type: string
      maxLength: 20000000
      description: 'A PDF, image or MS Word document'
      example: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAMAAAAOusbgAAABbmlDQ1BpY2MAACiRdZG9S0JRGMZ/aqKU4lBDRINDRYOCFERj2eAiIVaQ1aLXr8CPy71KSGvQ0iA0RC19Df0HtQatBUFQBBFN/QF9LSG392SghJ7Lue+P55zn5ZzngD1a0IpmTwiKpYoRj4T9y4kVv+uVPtz04sWZ1Ex9NhaL0nV83WNT9S6oenXf13H0pTOmBja38JSmGxXhGeHoRkVXvCM8oOWTaeEj4YAhBxS+VnqqyS+Kc03+UGwsxufArnr6c22camMtbxSFx4VHioWq9ncedRNPprS0IHVI5jAmcSKE8ZOiyjoFKgSlliSzzr7Qr2+esng0+evUMMSRIy/egKhV6ZqRmhU9I1+Bmsr9f55mdnKi2d0TBuezZb2PgmsXGnXL+j62rMYJOJ7gstTylyWn6U/R6y1t5BB8W3B+1dJSe3CxDYOPetJI/koOmfZsFt7OwJuA/lvoXW1m9bfO6QMsbsoT3cD+AYzJft/aD3MgZ8n6YYc7AAAAVFBMVEX////39P7d1PvLvvm5qPbCtPiPcvB0UOt+W+2ok/SXe/Ggh/Pl3vx7W+3LvfixnPXCs/iPcfC6p/eGZ++pkfP+/v+GZu76+v749//7+/7Uyfru6P3LfuNrAAAACXBIWXMAABYlAAAWJQFJUiTwAAAA20lEQVQYGe3B2U7DMBQE0PFNYRLHWUjC1v7/f4JwKlV+ZyTEnAMzMzMzMzMzMzMzMzMzMzMzMzMzM/srUnSXpwhopcszq37oIJMufJQDIiMbAzTKxEZOkChsZWjMbC3QWNgKaIzTEhHrC+8yNFLCj3XiKaBVeFogtrHaIZYmVgliB6uA2MYqILaxCogdrAJiOysArxCaWb0BeIdO6VktAD4gEz1PBcAnft2wdwXpOvAuQ2Jm6waFK1sbFErPxgGFtLMxJihkNhZo3EY+ygGZckw8jTO0yvZtDfx3X4HGDRef3EMyAAAAAElFTkSuQmCC'
      pattern: '^data:((image\/png)|(image\/jpeg)|(application\/pdf)|(application\/msword)|(application\/vnd\.openxmlformats-officedocument\.wordprocessingml\.document));base64,.+$'
      nullable: false

The api tester will use the pattern in the request, like so:

    "request": {
        "method": "POST",
        "url": "\/training-activities\/837868553\/proof-files",
        "body": {
            "filename": "voluptates",
            "contents": "data:image\/png|image\/jpeg|application\/pdf|application\/msword|application\/vnd.openxmlformats-officedocument.wordprocessingml.document);base64,\"",
            "kind": "diploma"
        }

Desired behaviour: it should use the example instead of the pattern

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