From 1a1577f8cc8bf2ac391b1e3d117a9bcfd04e0626 Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Fri, 7 Apr 2023 09:43:08 -0500 Subject: [PATCH] Provide a public view of the data model for the access team This ensures that no items, collections or files with dark access are in the public representation. It also adds a link to the parent virtual object if any. --- openapi.yml | 293 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 293 insertions(+) diff --git a/openapi.yml b/openapi.yml index a14b94ab..770f60dd 100644 --- a/openapi.yml +++ b/openapi.yml @@ -1427,6 +1427,299 @@ components: width: description: Width in pixels type: integer + PublicAccess: + type: object + oneOf: + - $ref: '#/components/schemas/CitationOnlyAccess' + - $ref: '#/components/schemas/ControlledDigitalLendingAccess' + - $ref: '#/components/schemas/LocationBasedAccess' + - $ref: '#/components/schemas/LocationBasedDownloadAccess' + - $ref: '#/components/schemas/StanfordAccess' + - $ref: '#/components/schemas/WorldAccess' + PublicAdministrative: + type: object + additionalProperties: false + properties: + releaseTags: + description: Tags for release + type: array + items: + $ref: '#/components/schemas/ReleaseTag' + PublicCollection: + description: A published representation of a group of Digital Repository Objects that indicate some type of conceptual grouping within the domain that is worth reusing across the system. + type: object + additionalProperties: false + properties: + cocinaVersion: + $ref: '#/components/schemas/CocinaVersion' + type: + description: The content type of the Collection. Selected from an established set of values. + type: string + enum: + - 'https://cocina.sul.stanford.edu/models/collection' + - 'https://cocina.sul.stanford.edu/models/curated-collection' + - 'https://cocina.sul.stanford.edu/models/user-collection' + - 'https://cocina.sul.stanford.edu/models/exhibit' + - 'https://cocina.sul.stanford.edu/models/series' + externalIdentifier: + $ref: '#/components/schemas/Druid' + label: + description: Primary processing label (can be same as title) for a Collection. + type: string + version: + description: Version for the Collection within SDR. + type: integer + access: + $ref: '#/components/schemas/PublicCollectionAccess' + administrative: + $ref: '#/components/schemas/Administrative' + description: + $ref: '#/components/schemas/Description' + identification: + $ref: '#/components/schemas/CollectionIdentification' + required: + - cocinaVersion + - description + - externalIdentifier + - label + - type + - version + - access + - administrative + - identification + PublicCollectionAccess: + description: Access metadata for collections + type: object + additionalProperties: false + properties: + view: + description: Access level + type: string + enum: + - 'world' + default: 'world' + copyright: + $ref: "#/components/schemas/Copyright" + useAndReproductionStatement: + $ref: "#/components/schemas/UseAndReproductionStatement" + license: + $ref: "#/components/schemas/License" + PublicDRO: + description: The public representation of a DRO for publishing to purl. + type: object + additionalProperties: false + properties: + cocinaVersion: + $ref: '#/components/schemas/CocinaVersion' + type: + description: The content type of the DRO. Selected from an established set of values. + type: string + enum: + - 'https://cocina.sul.stanford.edu/models/object' + - 'https://cocina.sul.stanford.edu/models/3d' + - 'https://cocina.sul.stanford.edu/models/agreement' + - 'https://cocina.sul.stanford.edu/models/book' + - 'https://cocina.sul.stanford.edu/models/document' + - 'https://cocina.sul.stanford.edu/models/geo' + - 'https://cocina.sul.stanford.edu/models/image' + - 'https://cocina.sul.stanford.edu/models/page' + - 'https://cocina.sul.stanford.edu/models/photograph' + - 'https://cocina.sul.stanford.edu/models/manuscript' + - 'https://cocina.sul.stanford.edu/models/map' + - 'https://cocina.sul.stanford.edu/models/media' + - 'https://cocina.sul.stanford.edu/models/track' + - 'https://cocina.sul.stanford.edu/models/webarchive-binary' + - 'https://cocina.sul.stanford.edu/models/webarchive-seed' + externalIdentifier: + $ref: '#/components/schemas/Druid' + label: + description: Primary processing label (can be same as title) for a DRO. + type: string + version: + description: Version for the DRO within SDR. + type: integer + access: + $ref: '#/components/schemas/PublicDROAccess' + administrative: + $ref: '#/components/schemas/PublicAdministrative' + description: + $ref: '#/components/schemas/Description' + identification: + $ref: '#/components/schemas/Identification' + structural: + $ref: '#/components/schemas/PublicStructural' + geographic: + $ref: '#/components/schemas/Geographic' + required: + - cocinaVersion + - access + - administrative + - description + - externalIdentifier + - label + - type + - version + - identification + - structural + PublicDROAccess: + type: object + additionalProperties: false + allOf: + - $ref: "#/components/schemas/PublicAccess" + - type: object + properties: + copyright: + $ref: "#/components/schemas/Copyright" + embargo: + $ref: '#/components/schemas/Embargo' + useAndReproductionStatement: + $ref: "#/components/schemas/UseAndReproductionStatement" + license: + $ref: "#/components/schemas/License" + PublicFile: + description: Binaries that are the basis of what our domain manages. Binaries here do not include metadata files generated for the domain's own management purposes. + type: object + additionalProperties: false + properties: + type: + description: The content type of the File. + type: string + enum: + - 'https://cocina.sul.stanford.edu/models/file' + externalIdentifier: + description: Identifier for the resource within the SDR architecture but outside of the repository. UUID. Constant across resource versions. What clients will use calling the repository. + type: string + label: + description: Primary processing label (can be same as title) for a File. + type: string + filename: + description: Filename for a file. Can be same as label. + type: string + size: + description: Size of the File (binary) in bytes. + type: integer + version: + description: Version for the File within SDR. + type: integer + hasMimeType: + description: MIME Type of the File. + type: string + use: + description: Use for the File. + type: string + hasMessageDigests: + type: array + items: + $ref: '#/components/schemas/MessageDigest' + access: + $ref: '#/components/schemas/PublicFileAccess' + administrative: + $ref: '#/components/schemas/FileAdministrative' + presentation: + $ref: '#/components/schemas/Presentation' + required: + - externalIdentifier + - label + - filename + - type + - version + - access + - administrative + - hasMessageDigests + PublicFileAccess: + description: Access metadata for published files + type: object + additionalProperties: false + oneOf: + - $ref: '#/components/schemas/ControlledDigitalLendingAccess' + - $ref: '#/components/schemas/LocationBasedAccess' + - $ref: '#/components/schemas/LocationBasedDownloadAccess' + - $ref: '#/components/schemas/StanfordAccess' + - $ref: '#/components/schemas/WorldAccess' + PublicFileSet: + description: Relevant groupings of publically displayable Files. + type: object + additionalProperties: false + properties: + type: + description: The content type of the Fileset. + type: string + enum: + - 'https://cocina.sul.stanford.edu/models/resources/audio' + - 'https://cocina.sul.stanford.edu/models/resources/attachment' + - 'https://cocina.sul.stanford.edu/models/resources/document' + - 'https://cocina.sul.stanford.edu/models/resources/file' + - 'https://cocina.sul.stanford.edu/models/resources/image' + - 'https://cocina.sul.stanford.edu/models/resources/media' + - 'https://cocina.sul.stanford.edu/models/resources/object' + - 'https://cocina.sul.stanford.edu/models/resources/page' + - 'https://cocina.sul.stanford.edu/models/resources/preview' + - 'https://cocina.sul.stanford.edu/models/resources/3d' + - 'https://cocina.sul.stanford.edu/models/resources/thumb' + - 'https://cocina.sul.stanford.edu/models/resources/video' + externalIdentifier: + type: string + label: + description: Primary processing label for a Fileset. + type: string + version: + description: Version for the Fileset within SDR. + type: integer + structural: + $ref: '#/components/schemas/PublicFileSetStructural' + required: + - externalIdentifier + - label + - type + - version + - structural + PublicFileSetStructural: + description: Structural metadata + type: object + additionalProperties: false + properties: + contains: + type: array + items: + $ref: '#/components/schemas/PublicFile' + PublicStructural: + description: Structural metadata + type: object + additionalProperties: false + properties: + contains: + description: Filesets that contain the digital representations (Files) + type: array + items: + $ref: '#/components/schemas/PublicFileSet' + hasMemberOrders: + description: Provided sequences or orderings of members, including some metadata about each sequence (i.e. sequence label, sequence type, if the sequence is primary, etc.). + type: array + items: + $ref: '#/components/schemas/Sequence' + isConstituentOf: + description: Virtual objects that this DRO is a member of + type: array + items: + $ref: '#/components/schemas/PublicVirtualObject' + isMemberOf: + description: Collections that this DRO is a member of + type: array + items: + $ref: '#/components/schemas/Druid' + PublicVirtualObject: + description: Summary of virtual object data. + type: object + additionalProperties: false + properties: + externalIdentifier: + $ref: '#/components/schemas/Druid' + displayTitle: + type: string + catalogLinks: + type: array + items: + $ref: '#/components/schemas/CatalogLink' Purl: description: Stanford persistent URL associated with the related resource. type: string