Skip to content

Commit

Permalink
chore: fix regex on components and oneOf replace (#179)
Browse files Browse the repository at this point in the history
* chore: fix regex on components and oneOf replace

* chore: uuid regex

* chore: uuid regex

* chore: changes
  • Loading branch information
kleyow authored Sep 27, 2024
1 parent 6ed4768 commit 798253c
Show file tree
Hide file tree
Showing 36 changed files with 67,772 additions and 115,296 deletions.
138 changes: 45 additions & 93 deletions docs/fspiop-rest-v2.0-ISO20022-openapi3-snippets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ components:
description: >
Specifies the unique identification of an account as assigned by the
account servicer.
oneOf:
anyOf:
- properties:
IBAN:
allOf:
Expand Down Expand Up @@ -1385,7 +1385,7 @@ components:
type: object
description: |
Sets of elements to identify a name of the identification scheme.
oneOf:
anyOf:
- properties:
Cd:
allOf:
Expand Down Expand Up @@ -1433,16 +1433,8 @@ components:
ActiveCurrencyAndAmount_SimpleType:
title: ActiveCurrencyAndAmount_SimpleType
type: string
description: |
NOTE: This regex doesn't seem correct given it's xsd definition.
<xs:simpleType name="ActiveCurrencyAndAmount_SimpleType">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="5"/>
<xs:totalDigits value="18"/>
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
pattern: ^(?=[\d\-\.\,]{1,18}$)([\d\-\,\.]{1,5})?$
pattern: >-
^(?!0\d)(\d{1,18}|\d{1,17}.\d{1}|\d{1,16}.\d{1,2}|\d{1,15}.\d{1,3}|\d{1,14}.\d{1,4}|\d{1,13}.\d{1,5})$
example: 123.45
ActiveCurrencyCode:
title: ActiveCurrencyCode
Expand Down Expand Up @@ -1484,8 +1476,9 @@ components:
ActiveOrHistoricCurrencyAndAmount_SimpleType:
title: ActiveOrHistoricCurrencyAndAmount_SimpleType
type: string
pattern: ^(?=[\d\-\.\,]{1,18}$)([\d\-\,\.]{1,5})?$
example: 123.45
pattern: >-
^(?!0\d)(\d{1,18}|\d{1,17}.\d{1}|\d{1,16}.\d{1,2}|\d{1,15}.\d{1,3}|\d{1,14}.\d{1,4}|\d{1,13}.\d{1,5})$
ActiveOrHistoricCurrencyCode:
title: ActiveOrHistoricCurrencyCode
type: string
Expand Down Expand Up @@ -1520,7 +1513,7 @@ components:
type: object
description: |
Choice of formats for the type of address.
oneOf:
anyOf:
- properties:
Cd:
allOf:
Expand Down Expand Up @@ -1574,8 +1567,9 @@ components:
type: string
description: |
Rate expressed as a decimal, for example, 0.7 is 7/10 and 70%.
pattern: ^(?=[\d\-\.\,]{1,11}$)([\d\-\,\.]{1,10})?$
example: 0.7
pattern: >-
^(?!0\d)(\d{1,11}|\d{1,10}.\d{1}|\d{1,9}.\d{1,2}|\d{1,8}.\d{1,3}|\d{1,7}.\d{1,4}|\d{1,6}.\d{1,5}|\d{1,5}.\d{1,6}|\d{1,4}.\d{1,7}|\d{1,3}.\d{1,8}|\d{1,2}.\d{1,9}|\d{1}.\d{1,10})$
BranchAndFinancialInstitutionIdentification6:
title: BranchAndFinancialInstitutionIdentification6
type: object
Expand Down Expand Up @@ -1833,7 +1827,7 @@ components:
description: |
Specifies the nature, or use of the account.
type: object
oneOf:
anyOf:
- properties:
Cd:
allOf:
Expand All @@ -1860,7 +1854,7 @@ components:
Contains details about high level purpose of the mandate based on a set
of pre-defined categories.
type: object
oneOf:
anyOf:
- properties:
Cd:
allOf:
Expand Down Expand Up @@ -1918,7 +1912,7 @@ components:
ChargeType3Choice
Specifies the type of charge.
type: object
oneOf:
anyOf:
- properties:
Cd:
allOf:
Expand Down Expand Up @@ -2015,7 +2009,7 @@ components:
description: |
Specifies the clearing system identification.
type: object
oneOf:
anyOf:
- properties:
Cd:
allOf:
Expand Down Expand Up @@ -2622,7 +2616,7 @@ components:
description: |
Cryptographically signed terms
type: object
oneOf:
anyOf:
- properties:
IlpV4PrepPacket:
allOf:
Expand Down Expand Up @@ -2752,7 +2746,6 @@ components:
description: |
Specifies a hexadecimal string with a length of 32 characters.
type: string
pattern: ^([0-9A-F][0-9A-F]){32}$
example: 1234567890ABCDEF1234567890ABCDEF
Exact4AlphaNumericText:
title: Exact4AlphaNumericText
Expand Down Expand Up @@ -2985,7 +2978,7 @@ components:
type: object
description: |
Specifies the name of the identification scheme.
oneOf:
anyOf:
- properties:
Cd:
allOf:
Expand Down Expand Up @@ -3180,8 +3173,14 @@ components:
Set of characteristics shared by all individual transactions
included in the message.
CdtTrfTxInf:
allOf:
- $ref: "#/components/schemas/CreditTransferTransaction68"
- description: |
Credit Transfer Transaction Information
required:
- GrpHdr
- CdtTrfTxInf
example:
GrpHdr:
MsgId: 12345
Expand Down Expand Up @@ -3875,17 +3874,11 @@ components:
- $ref: "#/components/schemas/PaymentTypeInformation28"
- description: |
Payment Type Information
CdtTrfTxInf:
allOf:
- $ref: "#/components/schemas/CreditTransferTransaction68"
- description: |
Credit Transfer Transaction Information
required:
- MsgId
- CreDtTm
- NbOfTxs
- SttlmInf
- CdtTrfTxInf
example:
MsgId: 12345
CreDtTm: "2020-01-01T00:00:00Z"
Expand All @@ -3909,29 +3902,6 @@ components:
PmtTpInf:
InstrPrty: NORM
CtgyPurp: CASH
CdtTrfTxInf:
PmtId:
InstrId: 12345
EndToEndId: 12345
Amt:
InstdAmt:
Ccy: EUR
Value: 100
Cdtr:
Nm: Name
CdtrAcct:
Id:
IBAN: BE71096123456769
Ccy: EUR
CdtrAgt:
FinInstnId:
BICFI: BIC
CdtrAgtAcct:
Id:
IBAN: BE71096123456769
Ccy: EUR
RmtInf:
Ustrd: Test
GroupHeader120:
title: GroupHeader120
description: >
Expand Down Expand Up @@ -4025,17 +3995,11 @@ components:
- $ref: "#/components/schemas/SettlementInstruction15"
- description: |
Settlement Information
CdtTrfTxInf:
allOf:
- $ref: "#/components/schemas/CreditTransferTransaction67"
- description: |
Credit Transfer Transaction Information
required:
- MsgId
- CreDtTm
- NbOfTxs
- SttlmInf
- CdtTrfTxInf
example:
MsgId: 12345
CreDtTm: "2020-01-01T00:00:00Z"
Expand All @@ -4050,26 +4014,6 @@ components:
Nm: John Doe
SttlmAcctSvcr:
BICFI: 123
CdtTrfTxInf:
PmtId:
InstrId: 123
EndToEndId: 123
PmtTpInf:
InstrPrty: NORM
InstdAmt:
Amt: 123
Ccy: EUR
ChrgBr: SLEV
CdtrAgt:
FinInstnId:
BICFI: 123
Cdtr:
Nm: John Doe
CdtrAcct:
Id:
IBAN: 123
RmtInf:
Ustrd: Test
IBAN2007Identifier:
title: IBAN2007Identifier
description: >
Expand All @@ -4081,8 +4025,8 @@ components:
International Bank Account Number (IBAN)" and replaced by the more
recent edition of the standard.
type: string
pattern: ^[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}$
example: FR1420041010050500013M02606
pattern: ^[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}$
ISODate:
title: ISODate
description: >
Expand Down Expand Up @@ -4346,7 +4290,7 @@ components:
description: >
Specifies the local instrument, as published in an external local
instrument code list or as a proprietary code.
oneOf:
anyOf:
- properties:
Cd:
allOf:
Expand Down Expand Up @@ -4492,8 +4436,8 @@ components:
Number:
title: Number
type: string
pattern: ^[\d\-\.\,]{1,18}$
example: 256
pattern: ^(?!0\d)\d{1,18}$
OrganisationIdentification29:
title: OrganisationIdentification29
description: |
Expand Down Expand Up @@ -4586,7 +4530,7 @@ components:
- description: |
Proprietary
Name of the identification scheme, in a free text form.
oneOf:
anyOf:
- properties:
Cd: {}
- properties:
Expand Down Expand Up @@ -4714,7 +4658,7 @@ components:
description: |
Nature or use of the account.
type: object
oneOf:
anyOf:
- properties:
OrgId:
allOf:
Expand Down Expand Up @@ -4747,7 +4691,7 @@ components:
description: |
Identification of a person, an organisation or a financial institution.
type: object
oneOf:
anyOf:
- properties:
Pty:
allOf:
Expand Down Expand Up @@ -4795,7 +4739,7 @@ components:
description: |
NOTE: Unsure on the description.
type: object
oneOf:
anyOf:
- properties:
OrgId:
allOf:
Expand Down Expand Up @@ -5231,8 +5175,9 @@ components:
PercentageRate:
title: PercentageRate
type: string
pattern: ^(?=[\d\-\.\,]{1,11}$)([\d\-\,\.]{1,10})?$
example: 1234
pattern: >-
^(?!0\d)(\d{1,11}|\d{1,10}.\d{1}|\d{1,9}.\d{1,2}|\d{1,8}.\d{1,3}|\d{1,7}.\d{1,4}|\d{1,6}.\d{1,5}|\d{1,5}.\d{1,6}|\d{1,4}.\d{1,7}|\d{1,3}.\d{1,8}|\d{1,2}.\d{1,9}|\d{1}.\d{1,10})$
PersonIdentification13:
title: PersonIdentification13
description: |
Expand Down Expand Up @@ -5296,7 +5241,7 @@ components:
description: |
Sets of elements to identify a name of the identification scheme.
type: object
oneOf:
anyOf:
- properties:
Cd:
allOf:
Expand Down Expand Up @@ -5539,7 +5484,7 @@ components:
description: |
Specifies the type of the proxy account.
type: object
oneOf:
anyOf:
- properties:
Cd:
allOf:
Expand Down Expand Up @@ -5578,7 +5523,7 @@ components:
chain.
type: object
oneOf:
anyOf:
- properties:
Cd:
allOf:
Expand Down Expand Up @@ -5701,7 +5646,7 @@ components:
description: |
Details about a service level.
type: object
oneOf:
anyOf:
- properties:
Cd:
allOf:
Expand Down Expand Up @@ -5792,7 +5737,7 @@ components:
description: |
Specifies the reason for the status.
type: object
oneOf:
anyOf:
- properties:
Cd:
allOf:
Expand Down Expand Up @@ -6485,8 +6430,14 @@ components:
Set of characteristics shared by all individual transactions
included in the message.
CdtTrfTxInf:
allOf:
- $ref: "#/components/schemas/CreditTransferTransaction67"
- description: |
Credit Transfer Transaction Information
required:
- GrpHdr
- CdtTrfTxInf
example:
GrpHdr:
MsgId: 123456789
Expand Down Expand Up @@ -6553,15 +6504,16 @@ components:
UUIDv4Identifier:
title: UUIDv4Identifier
type: string
pattern: ^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$
example: 8f3a3b2d-3b0a-4b3f-8e4e-1b2f3f4c5d6e
pattern: >-
^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
VerificationReason1Choice:
title: VerificationReason1Choice
type: object
description: |
Choice of format for the verification reason.
Only one, between the coded and the proprietary, can be chosen.
oneOf:
anyOf:
- properties:
Cd:
allOf:
Expand Down Expand Up @@ -6680,5 +6632,5 @@ components:
hexBinary:
title: hexBinary
type: string
pattern: ^(0x|0X)?[a-fA-F0-9]+$
example: 4660
pattern: ^[A-Za-z0-9-_]+[=]{0,2}$
Loading

0 comments on commit 798253c

Please sign in to comment.