paytrail / api-documentation

Paytrail Payment API documentation
MIT License
6 stars 11 forks source link

Postal code validation in OpenAPI schema #34

Closed tuutti closed 10 months ago

tuutti commented 2 years ago

This is not really an issue with the documentation, but I don't know where else I should report this.

Describe the bug OpenAPI schema expects postal code (in Address object) to only contain digits:

Address:
  type: object
  properties:
    postalCode:
      type: string
      pattern: '^\d+$'
      example: '00100'
      maxLength: 15
      description: Postal code

Some countries have postal codes that contain spaces and non-digit characters as well, like the UK for example: https://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom

jussiviitamaki commented 2 years ago

Any solutions for this?

jfrojd-paytrail commented 10 months ago

Fixed in merged PR made by tuutti