Skip to content

Commit

Permalink
Merge pull request #33 from oarepo/scoped_schemas
Browse files Browse the repository at this point in the history
Release 3.0.0
  • Loading branch information
mirekys authored Aug 30, 2021
2 parents 004e693 + cd8a38f commit e3d76af
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 71 deletions.
16 changes: 9 additions & 7 deletions oarepo_communities/datamodels/communities-v1.0.0.json5
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
{
"definitions": {
"primaryCommunity": {
"type": "string",
"description": "Primary community ID of the record"
},
"secondaryCommunities": {
"oarepo:secondaryCommunities": {
"type": "array",
"items": {
"type": "string",
"description": "List of secondary community IDs where the record is also published"
}
},
"description": "List of secondary community IDs where the record is also available",
"minItems": 1,
"uniqueItems": true
},
"oarepo:primaryCommunity": {
"type": "string",
"description": "Primary community ID of the record"
}
}
}
17 changes: 0 additions & 17 deletions oarepo_communities/datamodels/communities-v2.0.0.json5

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"Communities": {
"properties": {
"_primary_community": {
"oarepo:secondaryCommunities": {
"type": "keyword"
},
"_communities": {
"oarepo:primaryCommunity": {
"type": "keyword"
}
}
Expand Down
12 changes: 0 additions & 12 deletions oarepo_communities/included_mappings/v7/communities-v2.0.0.json

This file was deleted.

6 changes: 3 additions & 3 deletions oarepo_communities/jsonschemas/communities-v1.0.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"title": "OARepo Communities fields v1.0.0",
"type": "object",
"properties": {
"_primary_community": {
"oarepo:primaryCommunity": {
"type": "string",
"description": "Primary community ID of the record"
},
"_communities": {
"oarepo:secondaryCommunities": {
"type": "array",
"items": {
"type": "string",
Expand All @@ -17,7 +17,7 @@
}
},
"required": [
"_primary_community"
"oarepo:primaryCommunity"
]
}
}
Expand Down
24 changes: 0 additions & 24 deletions oarepo_communities/jsonschemas/communities-v2.0.0.json

This file was deleted.

5 changes: 0 additions & 5 deletions oarepo_communities/marshmallow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@


class OARepoCommunitiesMixin(Schema):
_primary_community = SanitizedUnicode(required=True)
_communities = List(SanitizedUnicode, default=list)


class OARepoCommunitiesMixinV2(Schema):
_primary_community = SanitizedUnicode(required=True,
data_key='oarepo:primaryCommunity',
attribute='oarepo:primaryCommunity')
Expand Down
2 changes: 1 addition & 1 deletion oarepo_communities/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
and parsed by ``setup.py``.
"""

__version__ = '2.4.0'
__version__ = '3.0.0'

0 comments on commit e3d76af

Please sign in to comment.