Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DotnDev opened this issue Feb 1, 2023 · 0 comments
Open

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

DotnDev opened this issue Feb 1, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@DotnDev
Copy link
Contributor

DotnDev commented Feb 1, 2023

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

@DotnDev DotnDev added the bug Something isn't working label Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant