material-identity / en10168-schemas Goto Github PK
View Code? Open in Web Editor NEWContains schema, translations and templates for EN10168 specification
License: GNU Affero General Public License v3.0
Contains schema, translations and templates for EN10168 specification
License: GNU Affero General Public License v3.0
The JSON Schema is split up into generic parts easying reuse. For practical reasons, having one file containing the complete JSON Schema would be handy.
https://github.com/material-identity/CoA-schemas/blob/main/utils/generate-readable-schema-cli.js
to this repo.package.json
.JSON Schema is easy to work with in many cases.
In ERPs receivers of certificates are not necessarily mapped or linked with legal entities. Therefore an identifier such as VAT or DUNS is not available by default for the generation of material certificates, only the email address is maintained.
To reduce effort and therefore friction in switching receivers to digital material certificates the email address is initially sufficient.
identifiers
in company.json
to optional
.Issuers can switch receivers of certificates without having to add VAT
and/or DUNS
.
The FOSSA integration is currently broken and the analysis is not executed during PR and merge.
I updated the authorization for material-identity and that was the occasion to dig into their docs.
It seems like there is a more efficient way to run the analysis than by using webhooks and since the analysis was always rather slow it got my attention.
So i suggest that we integrate this new process.
See https://docs.fossa.com/docs/provided-builds
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
A typical order number including its position in SAP looks like
20502841 000020
with
In the current design, the order position number (A97) is of type number so the result would be 20
.
The solution is to change
"A97": {
"description": "A custom field for the position number in the order",
"type": "number"
},
to
"A97": {
"description": "A custom field for the position number in the order",
"type": "string"
},
Users will be able to read SAP position numbers according to their expectations.
In EN 10168 there is no field assigned to the delivery date.
A detailed description of additions, deletions, or modifications proposed
Add to schema.json
"A96": {
"description": "A custom field for the delivery date",
"type": "date"
},
Update SupplementaryInformation
with
"SupplementaryInformation": {
"title": "CommercialTransactionSupplementaryInformation",
"type": "object",
"propertyNames": {
"pattern": "^A1[0-9]|^A[2-8][0-9]|^A[2-9][0-5]"
},
"patternProperties": {
"^A1[0-9]|^A[2-8][0-9]|^A[2-9][0-5]": {
"$ref": "#/definitions/KeyValueObject"
}
},
"additionalProperties": false
},
A fixed field for the delivery date is assigned.
Companies issue certificates without having CE, which is required only from some applications such as steel construction.
Remove Z04
from the list of required elements of object Validation
in schema.json
.
The schema supports certificates without CE requirements.
In the current implementation, the term "Purchaser" and its translations are used as section designations for the field A06
. In EN 10168, appendix A normative terms are defined.
Substitute the value for A06 in
DE.json
with Besteller/Empfänger
EN.json
with Customer/consignee
FR.json
with Acheteur/destinataire
PL.json
with Klient/odbiorca
The section designations comply with EN 10168.
Instead of using "VAT_Id" as the unique identifier for companies, DUNS could be also an appropriate option.
VAT Ids does not exist internationally, e.g. there is no vat id in USA.
DUNS -> Data Universal Numbering System, please see also: https://en.wikipedia.org/wiki/Data_Universal_Numbering_System
DUNS is an international standard and has a very broad adoption.
Extend the us market adoption
Currently the RefSchemaUrl property uses the uri
format, which is already a good validation, but why not going further and create a custom regexp pattern to validate it ?
Add (or replace the format
by) a pattern property.
Since the expected pattern is clearly defined here, it could provide an extra safe guard during certificates validation.
Since we changed our HTML rendering strategy to use partials inside the main template, it introduced the problem of knowing where the partials are located before compiling all the Handlebars pieces.
In order to help resolving the external partials consumed in template.hbs
, i suggest that we create a new static resource that can be used to contain references and links to the partials.
This resource could be a JSON file containing a map {[partialName]: path}
to download and would allow to easily lookup the partials before rendering the HTML .
Make HTML rendering easier for end user of the schema resources and tools.
In the script validate_spec.js
in line 13 the local schema.json
is set.
const schemaPath = resolve(__dirname, '../schema.json');
However, the actual validation is still executed against the schema provided in RefSchemaUrl
, which is not the idea I assume.
Describe the bug
The section SupplementaryInformation
with the fields C04-C09
are not rendered in HTML.
To Reproduce
Steps to reproduce the behavior:
test/fixtures/valid_certificate_4.json
.Expected behavior
Supplementary information is rendered on HTML the same way as on PDF.
Standards defines a specific number of digits after the comma for the minimum, maximum and actual value of the share of chemical elements. See https://www.astm.org/e0029-22.html and https://www.eng-tips.com/viewthread.cfm?qid=380053
The current Schema definition for ChemicalElements
defines the minimum, maximum andactual value as number
. By that zeros after the comma separator are skipped in the PDF and HTML rendering.
Example Maxium: 1.50
in JSON results in Maximum: 1.5 but should be Maximum: 1.50 on PDF.
Actual
, Minimum
and Maximum
to String
.The data format and the rendering complies to the standards and practice of the material industries.
The current libraries do not support new features as support for Chinese language and PDF/A-S compatibility.
Support of latest features
The link in the section https://github.com/material-identity/EN10168-schemas#docs links to outdated documentation.
Link to https://materialidentity.org/en10168
The expected benefits for all stakeholders
The element Z02
contains the issuing date of the declaration of compliance. Currently, the format definition is date-time
requiring time information. As there is no time information available on certificates it is suggested to change to date
removing the need to "invent" a hours and minutes.
Change the section in schema.json
from
"Z02": {
"description": "Date of issue and validation",
"type": "string",
"format": "date-time"
},
to
"Z02": {
"description": "Date of issue and validation",
"type": "string",
"format": "date"
},
Simplification in creation, rendering, and processing.
Currently, only a detailed change log is available. For users, a change summary is more helpful.
Add change log as implemented in https://github.com/material-identity/CoA-schemas/blob/main/changelog.md
A user-friendly change log is provided.
In the new script validate_spec.js
in line 13 ajv
is initialized with
const ajv = new Ajv({ strict: false, allErrors: true });
strict
set to false fails to detect missing required elements. If set to true
it works properly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.