Skip to content

Commit 63b8a19

Browse files
authored
Merge pull request #284 from papinet/hotfix/supporting-files-Lars
Let's merge the `hotfix/supporting-files-Lars` branch into the `main` branch
2 parents dbc477b + d8319c9 commit 63b8a19

File tree

9 files changed

+186
-12
lines changed

9 files changed

+186
-12
lines changed

CONTRIBUTING.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
1-
<!-- Copyright 2000-2024 Papinet SNC ("papiNet") the "Copyright Owner". All rights reserved by the Copyright Owner under the laws of the United States, Belgium, the European Economic Community, and all states, domestic and foreign. For support, more information, or to report implementation bugs, please contact papiNet at https://github.com/papinet. -->
1+
Copyright 2000 - 2026 the Confederation of European Paper Industries AISBL ("papiNet") the "Copyright Owner". All rights reserved by the Copyright Owner under the laws of the United States, Belgium, the European Economic Community, and all states, domestic and foreign. For support, more information, or to report implementation bugs, please contact papiNet at https://github.com/papinet.
22

33
# Contributing Guidelines
44

55
This document intends to establish guidelines which build a transparent, open mechanism for deciding how to evolve the papiNet API standard. The papiNet Central Working Group (CWG) will follow these processes when merging changes from external contributors or from the CWG itself. This guideline document will be adjusted as practicality dictates.
66

7+
## Use of GitHub issues
8+
9+
Issues are created for tracking of decisions and changes.
10+
11+
* Issues should be assigned to responsible maintainers, so that they get notifications when issues are updated or commented.
12+
13+
* Issues should be given appropiate labels when updated or commented.
14+
15+
* Solutions for issues are approved, approved with amendment or rejected by CWG.
16+
17+
* Implementation of a solution for an issue should have one or several commits. No other changes should exist in these commits. The commits should have a reference to the issue number. A description of the change and a link to the commits should be given in a comment of the issue.
18+
19+
* Implementation of a solution for an issue should be reviewed by at least one maintainer.
20+
21+
* Issues are closed at CWG API meetings.
22+
723
## Tracking Process
824

925
GitHub is the medium of record for all papiNet API standard updates.

FAQ.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Copyright 2000-2024 Papinet SNC ("papiNet") the "Copyright Owner". All rights reserved by the Copyright Owner under the laws of the United States, Belgium, the European Economic Community, and all states, domestic and foreign. For support, more information, or to report implementation bugs, please contact papiNet at https://github.com/papinet. -->
1+
Copyright 2000 - 2026 the Confederation of European Paper Industries AISBL ("papiNet") the "Copyright Owner". All rights reserved by the Copyright Owner under the laws of the United States, Belgium, the European Economic Community, and all states, domestic and foreign. For support, more information, or to report implementation bugs, please contact papiNet at https://github.com/papinet.
22

33
# Frequently Asked Questions (FAQ)
44

GOVERNANCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Copyright 2000-2024 Papinet SNC ("papiNet") the "Copyright Owner". All rights reserved by the Copyright Owner under the laws of the United States, Belgium, the European Economic Community, and all states, domestic and foreign. For support, more information, or to report implementation bugs, please contact papiNet at https://github.com/papinet. -->
1+
Copyright 2000 - 2026 the Confederation of European Paper Industries AISBL ("papiNet") the "Copyright Owner". All rights reserved by the Copyright Owner under the laws of the United States, Belgium, the European Economic Community, and all states, domestic and foreign. For support, more information, or to report implementation bugs, please contact papiNet at https://github.com/papinet.
22

33
# Governance
44

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2000-2024 Papinet SNC ("papiNet") the "Copyright Owner". All rights reserved by the Copyright Owner under the laws of the United States, Belgium, the European Economic Community, and all states, domestic and foreign. For support, more information, or to report implementation bugs, please contact papiNet at https://github.com/papinet.
189+
Copyright 2000 - 2026 the Confederation of European Paper Industries AISBL ("papiNet") the "Copyright Owner". All rights reserved by the Copyright Owner under the laws of the United States, Belgium, the European Economic Community, and all states, domestic and foreign. For support, more information, or to report implementation bugs, please contact papiNet at https://github.com/papinet.
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

MAINTAINERS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Copyright 2000-2024 Papinet SNC ("papiNet") the "Copyright Owner". All rights reserved by the Copyright Owner under the laws of the United States, Belgium, the European Economic Community, and all states, domestic and foreign. For support, more information, or to report implementation bugs, please contact papiNet at https://github.com/papinet. -->
1+
Copyright 2000 - 2026 the Confederation of European Paper Industries AISBL ("papiNet") the "Copyright Owner". All rights reserved by the Copyright Owner under the laws of the United States, Belgium, the European Economic Community, and all states, domestic and foreign. For support, more information, or to report implementation bugs, please contact papiNet at https://github.com/papinet.
22

33
## Voting Maintainers
44

NOTICE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Copyright 2000-2024 Papinet SNC ("papiNet") the "Copyright Owner". All rights reserved by the Copyright Owner under the laws of the United States, Belgium, the European Economic Community, and all states, domestic and foreign. For support, more information, or to report implementation bugs, please contact papiNet at https://github.com/papinet. -->
1+
Copyright 2000 - 2026 the Confederation of European Paper Industries AISBL ("papiNet") the "Copyright Owner". All rights reserved by the Copyright Owner under the laws of the United States, Belgium, the European Economic Community, and all states, domestic and foreign. For support, more information, or to report implementation bugs, please contact papiNet at https://github.com/papinet.
22

33
# Trademark and Logo Policies
44

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<!-- Copyright 2000-2024 Papinet SNC ("papiNet") the "Copyright Owner". All rights reserved by the Copyright Owner under the laws of the United States, Belgium, the European Economic Community, and all states, domestic and foreign. For support, more information, or to report implementation bugs, please contact papiNet at https://github.com/papinet. -->
1+
Copyright 2000 - 2026 the Confederation of European Paper Industries AISBL ("papiNet") the "Copyright Owner". All rights reserved by the Copyright Owner under the laws of the United States, Belgium, the European Economic Community, and all states, domestic and foreign. For support, more information, or to report implementation bugs, please contact papiNet at https://github.com/papinet. <br/><br/>
2+
23

34
<!-- markdownlint-disable MD041 -->
45

@@ -46,13 +47,21 @@ The following API endpoints allows a _supplier_ to communicate to a _logistics s
4647
* `PUT /logistics-delivery-notes/{logisticsDeliveryNoteId}`
4748
* `POST /logistics-goods-receipts`
4849
* `PUT /logistics-goods-receipts/{logisticsGoodsReceiptId}`
49-
* `GET /delivery-instructions`
50-
* `GET /delivery-instructions/{deliveryInstructionId}`
50+
* `GET /logistics-delivery-instructions`
51+
* `GET /logistics-delivery-instructions/{deliveryInstructionId}`
52+
53+
### Warehouse Logistics Inventory Change Use Case
54+
55+
The following API endpoints allows a _supplier_ to communicate inventory changes with a _logistics supplier_:
56+
57+
* `GET /logistics-inventory-changes`
58+
* `GET /logistics-inventory-changes/{logisticsInventoryChangeId}`
59+
* `POST /logistics-inventory-changes`
5160

5261
## The papiNet API Standard
5362

5463
The following normative document is available:
5564

56-
* [`papiNet-API.yaml`](3.0.0/papiNet-API.yaml) the OpenAPI document describing the papiNet API. This is the main normative document.
65+
* [`papiNet-API.yaml`](4.0.0/papiNet-API.yaml) the OpenAPI document describing the papiNet API. This is the main normative document.
5766

58-
In addition to these normative documents, we also have a papiNet mock service that provides live responses in line with the scenarios described within the use case documents.
67+
In addition to these normative documents, papiNet also has a **papiNet stub service** that provides live responses in line with the scenarios described within the use case documents.

papiNet-JSON-Style-Guide.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
Copyright 2000 - 2026 the Confederation of European Paper Industries AISBL ("papiNet") the "Copyright Owner". All rights reserved by the Copyright Owner under the laws of the United States, Belgium, the European Economic Community, and all states, domestic and foreign. For support, more information, or to report implementation bugs, please contact papiNet at https://github.com/papinet.
2+
3+
# papiNet JSON Style Guide
4+
5+
## Introduction
6+
7+
This style guide documents guidelines and recommendations for designing JSON structures for the papiNet API. It clarifies and standardizes specific cases so that all JSON structures used by the papiNet API have a standard look and feel. These guidelines are applicable to JSON requests and responses.
8+
9+
## Definitions
10+
11+
For the purposes of this style guide, papiNet defines the following terms:
12+
13+
* **_property_** - a name/value pair inside a JSON object.
14+
* **_property name_** - the name portion of the property, also called **_key_**.
15+
* **_property value_** - the value portion of the property, sometimes simply called **_value_**.
16+
17+
So, within the following example:
18+
19+
```json
20+
{
21+
"propertyName": "propertyValue",
22+
"anotherPropertyName": "anotherPropertyValue"
23+
}
24+
```
25+
26+
It's the `"propertyName": "propertyValue"` part, that papiNet calls a _property_.
27+
28+
## Design Rules
29+
30+
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119](https://datatracker.ietf.org/doc/html/rfc2119).
31+
32+
### Rule 0 - Naming convention for properties
33+
34+
If the context is clearly given by the parent, DO NOT repeat the context in the property name; If the context is NOT adequately given by the parent, then DO give the context in the property name up to what is necessary.
35+
36+
Let's give an example of each case:
37+
38+
* within `supplierOrders[]`, `supplierOrderNumber` should become `number` because its parent `supplierOrders[]` is giving the context.
39+
40+
* within `supplierOrders[]`, `purchaseOrderNumber` should NOT become `number` because its parent `supplierOrders[]` is NOT giving the right context, it is not the `number` (identifier) of the `supplierOrders[]`, but of the `number` (identifier) of `purchaseOrders[]`.
41+
42+
### Rule 1
43+
44+
papiNet restrict enumerated values to the minimum list that applies within the context. As a consequence, objects will be usually be defined **locally**! However, if a structure can be reuse whatever the context is, it could be defined globally.
45+
46+
### Rule 2 - How to handle empty collection
47+
48+
An empty collection MUST be communicated via the HTTP status code `204 No Content` and the response MUST NOT contain a response's body. This rule will be enforced by not allowing empty array in the non-empty response's body using `minItems: 1`.
49+
50+
### Rule 3 - minLength of property with type `string`
51+
52+
When papiNet defines a property with type `string` required, papiNet ALWAYS means that this property MUST communicate a non-empty information, therefore the constraint `minLength: 1` will always be added.
53+
54+
When a property with type `string` is not required and there is no information to be communicated, the property MUST NOT appear in the response's body. That rule will be enforced by always add the constraint `minLength: 1` to all properties with type `string`.
55+
56+
This `minLength: 1` constraint will not be added to the property with type `string` that already has such a constraint via `enum` or `format`. Of course, more restrictive constraint with more than 1 character minimum can be defined, but not less!
57+
58+
### Rule 4 - maxLength of property with type `string`
59+
60+
papiNet does not set a `maxLength` to all properties with type `string` driven by system technical constraints. papiNet only sets a `maxLength` to a property with type `string` when it is driven by a business constraint!
61+
62+
### Rule 5 - The response body always contains the full representation of the resource
63+
64+
The response body always contains the full representation of the resource, including the `id` even if it is already part of the request (usually conveyed by the URL).
65+
66+
### Rule 6 - Avoid lookup optimization
67+
68+
When a response contains the reference to something (e.g. a _seller-product_), it MUST only contain the identifier of that thing and any additional information MUST be retrieved via a subsequent lookup. There should not be any lookup optimization combining the identifier with additional information.
69+
70+
### Rule 7 - Array MUST be defined to have at least one element
71+
72+
When papiNet defines a property of type `array`, papiNet ALWAYS means that this array MUST have at least one element; therefore the constraint `minItems: 1` will always be added.
73+
74+
### Rule 8 - Response payload size SHOULD always be minimized
75+
76+
... (with the execption of the `id`)
77+
78+
### Rule 9 - UUID (only) as resource IDs
79+
80+
We MUST use UUID (only) for resource ID defined by the `id` property of every resource/entity/object.
81+
82+
When referring to another resource/entity/object we MUST also use this UUID only, therefore, to be able to know which type of resource/entity/object this UUID refers to, we MUST name of property or one of its ancestors including the type of resource/entity/object.
83+
84+
### Rule 10 - Properties with `...Timestamp` and `...DateTime` suffixes
85+
86+
We have two types of properties capturing date and time:
87+
88+
* The properties ending with the suffix `...Timestamp`: the MUST contain a date and time expressed in UTC, ending with the letter "Z", e.g. `2024-04-23T13:24:26.000Z`.
89+
* The properties ending with the suffix `...DateTime`: they MUST contain a local date and time, in accordance with the ISO 8601 standard (preferably without explicit time-zone) for which the location is defined by the business context, excluding duration alone, but including intervals such as the following:
90+
- `2023-08-16T13:00/2023-08-18T13:00`
91+
- `2023-08-16/2023-08-18`
92+
- `2023-08-16T13:00/P2D`
93+
- `P2D/2023-08-18T13:00 `
94+
95+
### Rule 11 - JSON properties format
96+
97+
JSON properties MUST be written in lowerCamelCase names capitalize the first letter of each word, except the first which is always lowercase, **even if it's an acronym**. For instance, we have the property `coordinatesWgs84:` where `Wgs` stands for "World Geodetic System".
98+
99+
### Rule 12 - Avoid abbreviations
100+
101+
All names specified in path and query parameters, resource names, and JSON input and output fields and pre-defined values SHOULD NOT use abbreviations or acronyms.
102+
103+
However, we have decided, during papiNet CWG meeting 2024-06-19 (Wed), to make an exception with "unit of measure" that we will write `uom` or `(...)Uom`, instead of `unitOfMeasure` or `(...)UnitOfMeasure`.

tools/README.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,52 @@
1+
Copyright 2000 - 2026 the Confederation of European Paper Industries AISBL ("papiNet") the "Copyright Owner". All rights reserved by the Copyright Owner under the laws of the United States, Belgium, the European Economic Community, and all states, domestic and foreign. For support, more information, or to report implementation bugs, please contact papiNet at https://github.com/papinet.
2+
13
## Tools
24

3-
This `tools/` folder does contain a few tools/scripts that help us to develop the papiNet API standard.
5+
The `tools/` folder serves as a repository for some tools.
6+
papiNet makes no guarantees regarding the functionality, performance or suitability of these tools.
7+
8+
### How to install the _Standalone Pact Stub Server_ on Windows (without administrative rights)
9+
10+
1\. Download the archive `pact-stub-server-windows-x86_64.exe.gz` containing the latest version of the binary `pact-stub-server.exe` at https://github.com/pact-foundation/pact-stub-server/releases into your `\Downloads` folder.
11+
12+
***Note:*** You might have to click on the "Show all __ assets" link!
13+
14+
2\. Using the File Explorer, create a new subfolder `Pact` within the folder `C:\Users\{Username}\AppData\Local\Programs`.
15+
16+
3\. Unzip/Extract the file `pact-stub-server.exe` from the `pact-stub-server-windows-x86_64.exe.gz` archive into the folder `C:\Users\{Username}\AppData\Local\Programs\Pact`.
17+
18+
4\. From a Windows Command Prompt run the following command:
19+
20+
```text
21+
rundll32.exe sysdm.cpl,EditEnvironmentVariables
22+
```
23+
24+
5\ . From the "User variables for {Username}" section, click on the "New..." button to create a new variable with the name `PACT_BIN` and the value `C:\Users\{Username}\AppData\Local\Programs\Pact`.
25+
26+
6\. From the "User variables for {Username}" section, select the `Path` variable and click on the "Edit.." button, then click on the "New" button and add the line `%PACT_BIN%` at the end.
27+
28+
7\. From a new Windows Command Prompt run the following command to verify the installation:
29+
30+
```text
31+
pact-stub-server --version
32+
```
33+
34+
If all went well, you should get a response like this one:
35+
36+
```text
37+
pact stub server version : v0.7.0
38+
pact specification version: v4.0
39+
```
40+
41+
### `analyse-uom.js`
42+
43+
This script will list all the `uom` (unit of measure) within the schemas of the papiNet API OpenAPI documentation.
44+
45+
```text
46+
node analyse-uom.js
47+
```
48+
49+
450

551
### `analyse-uom.js`
652

0 commit comments

Comments
 (0)