swissfintechinnovations / ca-payment

Common APIs for AIS and PIS
https://www.common-api.ch
Apache License 2.0
0 stars 3 forks source link

Change content type to "UTF-8" #81

Open ochatelain opened 8 months ago

ochatelain commented 8 months ago

IS:

  1. The media-type of XML messages is currently defined as application/xml.
  2. In the example request <?xml version="1.0" encoding="UTF-8"?> is declared inside the file as text, but not mandatory. ... so the content-type negotiation would be up to the SU / SP ...
  3. One Service User sent us XML without any encoding.
  4. We expected for historic reason "ISO-8859-1" as default.

PROPOSAL

  1. Let's change the media-type from application/xml to application/xml; charset=utf-8 in Release 5.0 and never talk about the issue again :-).

Here the location in the specification: image

One of the sections affected - PAIN.001 upoad in PSS:

  /iso20022/payments:
    post:
      tags:
        - iso20022
      summary: Submit an ISO20022 XML payment instruction (PAIN.001)
      description: >
        Submit an ISO20022 XML PAIN.001 payment instruction.

        The submitted payment instruction must conform to the XML Schema and
        Implementation Guidelines defined by Swiss Payment Standards;

        see:
        https://www.six-interbank-clearing.com/en/home/standardization/iso-payments/customer-bank/implementation-guidelines.html
      operationId: submitIso20022PaymentInstruction
      parameters:
        - $ref: '#/components/parameters/permissionid_in_header'
        - $ref: '#/components/parameters/correlation_in_header'
        - $ref: '#/components/parameters/agent_in_header'
        - $ref: '#/components/parameters/targetid_in_header'
        - $ref: '#/components/parameters/psu_ip_in_header'
        - $ref: '#/components/parameters/psu_user_agent_in_header'
        - $ref: '#/components/parameters/optional_authorization_in_header'
        - $ref: '#/components/parameters/optional_instance_id_in_header'
      requestBody:
        required: true
        description: Payment instruction details as defined by data model.
        content:
          application/xml:
            schema:
              type: string
RaulGuirao commented 7 months ago

According to SPS pain and camt specification the messages need to be UTF-8 encoded. We have noticed that banks may accept also other encodings too.

SPS ISO Meldungen mit Zeichensatz UTF-8
RaulGuirao commented 5 months ago

The adding of the «charset=utf-8» in the content header will not be any breaking change. bLink system will not validate if the enconding complies with UTF-8 therefore there will be no impact on serivce user nor service provider. The adding helps to state more precise and clear which enconding is expected.

svenbiellmann commented 5 months ago

Meeting Notes 4.4.24

The pull request will be prepared and discussed on next meeting.

svenbiellmann commented 3 months ago

Meetin Notes 20.6.24

This issue will be discussed on 15th August.

svenbiellmann commented 1 month ago

Meeting Notes 15.8.24

The pull request has to be generated and presented on 26th September by @RaulGuirao.