Open patricekrakow opened 1 week ago
Done, see commit a3218cf.
I missed the Lars' proposal for the JSON-ification of SafetyAndEnvironmentalInformation
(XML).
Here it is: (from email sent on Wed, Jun 26, 8:20 PM)
[Uploading papiNet API schema snippets 2024-06-10.yaml.txt…]()
safetyAndEnvironmental:
type: object
required:
- type
- assignedBy
properties:
# quantity and freeText existing in XML not added
# certification now limited to a percentage, in XML a measurement value.
type:
type: string
enum:
- Deforestation
- FSC100%
- FSCControlledWood
- FSCMix_x%
- FSCMixCredit
- FSCRecycled_x%
- FSCRecycledCredit
- PEFCControlledSources
- X%_PEFCcertified
assignedBy:
type: string
enum:
- EU
- FSC
- PEFC
licenceNumber:
type: string
minLength: 1
chainOfCustoty:
type: object
required: value
properties:
certificationBody:
type: string
minlength: 1
value:
type: string
minlength: 1
certificationPercentage:
type: Number
exclusiveMinimum: 0
references:
type: array
minItems: 1
items:
type: object
required:
- identifier
properties:
identifier:
type: object
required:
- type
- value
properties:
type:
type: string
enum:
- EUDRDueDiligenceStatementReferenceNumber
value:
type: string
minlength: 1
subReference:
type: object
required:
- identifier
identifier:
type: object
required:
- type
- value
properties:
type:
type: string
enum:
- EUDRDueDiligenceStatementVerificationNumber
value:
type: string
minlength: 1
(I have just corrected a little indentation issue).
I will update the schema accordingly, I just need 2 clarifications:
safetyAndEnvironmentalInformationDetail
or safetyAndEnvironmentalInformationDetails
depending on the answer of 1. Any other suggestions?
In XML, the element is called
SafetyAndEnvironmentalInformation
(XML). It's a bit annoying as (1) we want to have it as an array, and (2) there is no plural form of "information" in English. A way - to be discussed/approved later - to fix this is to add the suffix(...)Details
. We will then usesafetyAndEnvironmentalInformationDetails
(JSON).We will not JSON-ify the complete structure of the XML element
SafetyAndEnvironmentalInformation
, but only select the following parts:SafetyAndEnvironmentalType [attribute]
(XML) will be used astype
(JSON) with the same enumeration list:Agency [attribute]
(XML) will be used asassignedBy
(JSON) with the same enumeration list:WARNING: This list probably needs to be restricted dependending of the context, i.e.
safetyAndEnvironmentalInformationDetails
.ChainOfCustody
(XML) andCertificationBody [attribute]
(XML) will be used aschainOfCustody.value
(JSON) andchainOfCustody.assignedBy
(JSON).The complete structure will look like the following: