Skip to content

Commit

Permalink
feat: 3461 entry inlining
Browse files Browse the repository at this point in the history
  • Loading branch information
Nis Jespersen committed Nov 2, 2023
1 parent 5e68a74 commit 2c70161
Show file tree
Hide file tree
Showing 5 changed files with 847 additions and 47 deletions.
12 changes: 2 additions & 10 deletions docs/openapi/components/schemas/common/CBPEntry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,6 @@ properties:
$linkedData:
term: referenceIDNumber
'@id': https://w3id.org/traceability#referenceIDNumber
headerParties:
title: Header Parties
description: Select the Header Party Type from the available options. Use a separate line for each Header Party Type. The Header Parties must apply to the entire entry. If not, skip to line information (Block 24).
type: array
items:
$ref: ./CBPEntryEntity.yml
$linkedData:
term: headerParties
'@id': https://schema.org/Organization
lineItems:
title: Line Items
type: array
Expand Down Expand Up @@ -339,7 +330,8 @@ example: |-
"itemCount": 400,
"itemParty": {
"type": ["CBPEntryEntity"],
"consignee": {
"role": "Consignee",
"organization": {
"type": ["Organization"],
"name": "Future Mobility, Inc.",
"location": {
Expand Down
122 changes: 93 additions & 29 deletions docs/openapi/components/schemas/common/CBPEntryEntity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,97 @@ properties:
type: string
enum:
- CBPEntryEntity
manufacturer:
title: Manufacturer
description: A manufacturer party.
$ref: ./Organization.yml
$linkedData:
term: importer
'@id': https://vocabulary.uncefact.org/manufacturerParty
consignee:
title: Consignee
description: Consignee
$ref: ./Organization.yml
$linkedData:
term: consignee
'@id': https://vocabulary.uncefact.org/consigneeParty
seller:
title: Seller
description: An entity which offers (sells / leases / lends / loans) the services / goods. A seller may also be a provider.
$ref: ./Organization.yml
$linkedData:
term: seller
'@id': https://vocabulary.uncefact.org/sellerParty
buyer:
title: Buyer
description: Importer of record. Party placing the order or paying the invoice.
$ref: ./Organization.yml
$linkedData:
term: buyer
'@id': https://vocabulary.uncefact.org/buyerParty
role:
title: Role
type: string
enum:
- Manufacturer
- Consignee
- Seller
- Buyer
organization:
title: Organization
type: object
properties:
type:
type: array
readOnly: true
const:
- Organization
default:
- Organization
items:
type: string
enum:
- Organization
id:
title: Issuer's Identifier
description: Issuing organization identifier, typically a Decentralized Identifier (DID).
type: string
format: uri
name:
title: Name
description: Issuing organization name.
type: string
location:
title: Location
description: Issuing organization's location of business.
type: object
properties:
type:
type: array
readOnly: true
const:
- Place
default:
- Place
items:
type: string
enum:
- Place
address:
title: Postal Address
description: Issuing organization's postal address.
type: object
properties:
type:
type: array
readOnly: true
const:
- PostalAddress
default:
- PostalAddress
items:
type: string
enum:
- PostalAddress
streetAddress:
title: Street Address
description: >-
The street address expressed as free form text. The street address is
printed on paper as the first lines below the name. For example, the name
of the street and the number in the street, or the name of a building.
type: string
addressLocality:
title: City
description: Text specifying the name of the locality; for example, a city.
type: string
addressRegion:
title: State
description: >-
Text specifying a province or state in abbreviated format; for example,
NJ.
type: string
postalCode:
title: Postal Code
description: Text specifying the postal code for an address.
type: string
addressCountry:
title: Country
description: >-
The two-letter ISO 3166-1 alpha-2 country code.
type: string
additionalProperties: false
importerOfRecord:
title: Importer Of Record
description: US CBP importer of record.
Expand All @@ -58,7 +121,8 @@ required:
example: |-
{
"type": ["CBPEntryEntity"],
"consignee": {
"role": "Consignee",
"organization": {
"type": ["Organization"],
"name": "Future Mobility, Inc.",
"location": {
Expand Down
3 changes: 2 additions & 1 deletion docs/openapi/components/schemas/common/CBPEntryLineItem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ example: |-
"itemCount": 400,
"itemParty": {
"type": ["CBPEntryEntity"],
"consignee": {
"role": "Consignee",
"organization": {
"type": ["Organization"],
"name": "Future Mobility, Inc.",
"location": {
Expand Down
7 changes: 7 additions & 0 deletions docs/openapi/components/schemas/common/Place.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ properties:
$linkedData:
term: usPortCode
'@id': https://w3id.org/traceability#usPortCode
firmsCode:
title: FIRMS Code
description: Facilities Information and Resources Management Code
type: string
$linkedData:
term: firmsCode
'@id': https://w3id.org/traceability#firmsCode
additionalProperties: false
required:
- type
Expand Down
Loading

0 comments on commit 2c70161

Please sign in to comment.