-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract common ag inspection info into its own schema #584
Extract common ag inspection info into its own schema #584
Conversation
@@ -245,7 +261,7 @@ example: |- | |||
"Organization" | |||
], | |||
"name": "Ace Foodstuffs", | |||
"description": "Agricultural goods shipping & distribution", | |||
"description": "Ag goods shipping & distribution", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a step in the wrong direction. "Ag" is not as clear as "Agriculture".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree
https://github.com/w3c-ccg/traceability-vocab/actions/runs/3223964212/jobs/5274591511
|
|
OK to merge once Jest tests are all passing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay to merge once passing Jest tests
delegateOf: | ||
title: Delegate Of | ||
description: Inspector is acting on behalf of this entity (common with many ag. inspections). | ||
$ref: ./Entity.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will likely create other issues, but not a blocker.
A number of agricultural inspection schemas (
FoodGradeInspection
,AgricultureInspectionGeneric
, several more in the works) share several common properties. The ideal solution would be to create a baseAgricultureInspection
schema which other inspections extend, but as far as I know that functionality isn't currently supported (see issue 162, issue 277).An alternative to inheritance is to create a schema which includes properties common to multiple inspection schemas and include that in each. This PR implements that approach by creating an
AgricultureInspectionCommonInfo
schema and refactoringAgricultureInspectionGeneric
(renamed fromAgricultureInspectionReport
for clarity) andFoodGradeInspection
to make use of this common info schema.