-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from VineetBala-AOT/main
Adding a new document
- Loading branch information
Showing
31 changed files
with
326 additions
and
300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
condition-api/src/condition_api/schemas/condition_attribute.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
"""Condition Attribute model class. | ||
Manages the Condition Attribute | ||
""" | ||
|
||
from marshmallow import EXCLUDE, Schema, fields | ||
|
||
class BaseSchema(Schema): | ||
"""Base schema to exclude unknown fields in the deserialized output.""" | ||
|
||
class Meta: | ||
unknown = EXCLUDE | ||
|
||
|
||
class ConditionAttributeSchema(BaseSchema): | ||
"""Condition Attribute schema.""" | ||
deliverable_name = fields.Str(data_key="deliverable_name") | ||
is_plan = fields.Bool(data_key="is_plan") | ||
approval_type = fields.Str(data_key="approval_type") | ||
stakeholders_to_consult = fields.List(fields.Str(), data_key="stakeholders_to_consult") | ||
stakeholders_to_submit_to = fields.List(fields.Str(), data_key="stakeholders_to_submit_to") | ||
consultation_required = fields.Bool(data_key="consultation_required") | ||
related_phase = fields.Str(data_key="related_phase") | ||
days_prior_to_commencement = fields.Int(data_key="days_prior_to_commencement") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
"""Subconditio model class. | ||
Manages the Subconditio | ||
""" | ||
|
||
from marshmallow import EXCLUDE, Schema, fields | ||
|
||
class BaseSchema(Schema): | ||
"""Base schema to exclude unknown fields in the deserialized output.""" | ||
|
||
class Meta: | ||
unknown = EXCLUDE | ||
|
||
|
||
class SubconditionSchema(BaseSchema): | ||
"""Subcondition schema.""" | ||
subcondition_id = fields.Str(data_key="subcondition_id") | ||
subcondition_identifier = fields.Str(data_key="subcondition_identifier") | ||
subcondition_text = fields.Str(data_key="subcondition_text") | ||
|
||
# Recursively define subconditions (i.e., subconditions can have child subconditions) | ||
subconditions = fields.List(fields.Nested(lambda: SubconditionSchema()), data_key="subconditions") |
Oops, something went wrong.