From 28e938da473c05666f9d1003cf39d8edcc87ca75 Mon Sep 17 00:00:00 2001 From: Todd Kazakov Date: Thu, 14 Sep 2023 12:25:47 +0300 Subject: [PATCH 1/2] Remove image service --- reference/images.v1.yaml | 521 ------------------ reference/images/models/base.v1.yaml | 23 - reference/images/models/content.v1.yaml | 5 - .../images/models/contentattributes.v1.yaml | 24 - reference/images/models/contentintent.v1.yaml | 12 - reference/images/models/height.v1.yaml | 8 - reference/images/models/id.v1.yaml | 6 - reference/images/models/image.v1.yaml | 17 - reference/images/models/imagelist.v1.yaml | 6 - .../images/models/imagemediatype.v1.yaml | 8 - .../images/models/imagewithcontent.v1.yaml | 30 - .../images/models/imagewithmetadata.v1.yaml | 10 - reference/images/models/metadata.v1.yaml | 15 - reference/images/models/name.v1.yaml | 7 - reference/images/models/revision.v1.yaml | 6 - reference/images/models/size.v1.yaml | 8 - reference/images/models/status.v1.yaml | 10 - reference/images/models/suffix.v1.yaml | 11 - reference/images/models/width.v1.yaml | 8 - .../images/parameters/contentintent.v1.yaml | 8 - reference/images/parameters/extension.v1.yaml | 11 - reference/images/parameters/id.v1.yaml | 8 - reference/images/parameters/rendition.v1.yaml | 8 - reference/images/parameters/revision.v1.yaml | 8 - reference/images/parameters/suffix.v1.yaml | 12 - .../parameters/suffixorcontentintent.v1.yaml | 23 - 26 files changed, 813 deletions(-) delete mode 100644 reference/images.v1.yaml delete mode 100644 reference/images/models/base.v1.yaml delete mode 100644 reference/images/models/content.v1.yaml delete mode 100644 reference/images/models/contentattributes.v1.yaml delete mode 100644 reference/images/models/contentintent.v1.yaml delete mode 100644 reference/images/models/height.v1.yaml delete mode 100644 reference/images/models/id.v1.yaml delete mode 100644 reference/images/models/image.v1.yaml delete mode 100644 reference/images/models/imagelist.v1.yaml delete mode 100644 reference/images/models/imagemediatype.v1.yaml delete mode 100644 reference/images/models/imagewithcontent.v1.yaml delete mode 100644 reference/images/models/imagewithmetadata.v1.yaml delete mode 100644 reference/images/models/metadata.v1.yaml delete mode 100644 reference/images/models/name.v1.yaml delete mode 100644 reference/images/models/revision.v1.yaml delete mode 100644 reference/images/models/size.v1.yaml delete mode 100644 reference/images/models/status.v1.yaml delete mode 100644 reference/images/models/suffix.v1.yaml delete mode 100644 reference/images/models/width.v1.yaml delete mode 100644 reference/images/parameters/contentintent.v1.yaml delete mode 100644 reference/images/parameters/extension.v1.yaml delete mode 100644 reference/images/parameters/id.v1.yaml delete mode 100644 reference/images/parameters/rendition.v1.yaml delete mode 100644 reference/images/parameters/revision.v1.yaml delete mode 100644 reference/images/parameters/suffix.v1.yaml delete mode 100644 reference/images/parameters/suffixorcontentintent.v1.yaml diff --git a/reference/images.v1.yaml b/reference/images.v1.yaml deleted file mode 100644 index ff2eb188..00000000 --- a/reference/images.v1.yaml +++ /dev/null @@ -1,521 +0,0 @@ -openapi: 3.0.0 -info: - title: Images API - version: '1.0' - description: |- - The Tidepool API is an HTTP REST API used by Tidepool clients use to communicate with the Tidepool Platform. - - For more information, see the [Getting Started](../docs/quick-start.md) section. - termsOfService: https://developer.tidepool.org/terms-of-use - contact: - name: API Support - url: https://support.tidepool.org/ - email: support@tidepool.org - license: - name: BSD 2-Clause 'Simplified' License - url: https://github.com/tidepool-org/platform/blob/master/LICENSE - x-tidepool-service: https://github.com/tidepool-org/platform/image - -servers: - - url: 'https://external.integration.tidepool.org' - description: integration - - url: 'https://api.tidepool.org' - description: production - - url: 'https://dev1.dev.tidepool.org' - description: dev1 - - url: 'https://qa1.development.tidepool.org' - description: qa1 - - url: 'https://qa2.development.tidepool.org' - description: qa2 - -security: - - sessionToken: [] - -tags: - - name: Internal - description: >- - APIs intended for internal use by Tidepool. - - name: Images - description: >- - List, create, and manage images. - - Images may be created with or without metadata and content. - The content format may be either JPEG or PNG, with or without transparency. - The content width and height may be up to 10,000 pixels. - The content size, in bytes, may be up to 100MB. - Each image has a `status`. - If an image is created without content, then its status is `created`. - If the image is created with content or has been updated to include content then its status is `available`. - Each image with content has a `contentIntent`. - When content is uploaded for an image, the uploader must specify whether the intent of the content is `original`, - indicating that the content is the original, or `alternate`, indicating that the content is an alternate version - of the original, typically a smaller, lower resolution or lower quality version. - The image may be created or updated with `alternate` content intent initially and at a later time updated with the `original` content intent. - This supports mobile device clients initially uploading low resolution `alternate` content while on a cellular network and later uploading the `original` content while on a WiFi network. - When content is uploaded or downloaded, the MD5 digest of the content may be included to confirm the correct bytes were received. - Renditions of the current content can be requested using a variety of URL path parameters. - The requested rendition can specify the width, height, mode of transformation, background color, quality (JPEG only), and format. - See the Get Image Rendition endpoint for further details. - -components: - securitySchemes: - sessionToken: - $ref: './common/security/tidepoolsessiontoken.v1.yaml' - - responses: - Image: - description: Successfully created an image. - content: - 'application/json': - schema: - $ref: './images/models/image.v1.yaml' - - ImageContent: - description: Successfully returned content for the specified image. - headers: - Digest: - $ref: './common/headers/digestmd5.v1.yaml' - content: - 'image/jpeg': - schema: - $ref: './images/models/content.v1.yaml' - 'image/png': - schema: - $ref: './images/models/content.v1.yaml' - -paths: - '/v1/users/{userId}/images/metadata': - parameters: - - $ref: './common/parameters/tidepooluserid.yaml' - post: - operationId: CreateImageMetadata - summary: Create Image (Metadata) - description: >- - Create a new image for the specified user with only metadata. Content - can be added later. - - The body of the request is the UTF-8 JSON encoded Metadata. - requestBody: - required: true - content: - 'application/json': - schema: - $ref: './images/models/metadata.v1.yaml' - responses: - '201': - description: Successfully created an image. - content: - 'application/json': - schema: - $ref: './images/models/imagewithmetadata.v1.yaml' - tags: - - Images - - Internal - - '/v1/users/{userId}/images/content/{contentIntent}': - parameters: - - $ref: './common/parameters/tidepooluserid.yaml' - - $ref: './images/parameters/contentintent.v1.yaml' - post: - operationId: CreateImageContent - summary: Create Image (Content) - description: >- - Create a new image for the specified user with only content using the - specified content intent. Metadata can be added later. - - The body of the request is the raw bytes of the content. - - The Content-Type header must be the MIME type of the content. - requestBody: - required: true - content: - 'image/jpeg': - schema: - $ref: './images/models/content.v1.yaml' - 'image/png': - schema: - $ref: './images/models/content.v1.yaml' - responses: - '201': - description: Successfully created image with content. - content: - 'application/json': - schema: - $ref: './images/models/imagewithcontent.v1.yaml' - tags: - - Images - - Internal - - '/v1/users/{userId}/images': - parameters: - - $ref: './common/parameters/tidepooluserid.yaml' - post: - operationId: CreateImageMIME - summary: Create Image (MIME) - description: >- - Create a new image for the specified user from a MIME/Multipart encoded - request body containing metadata, content intent, and content. - - The Content-Type header must be `multipart/form-data` and include a valid `boundary` parameter. - - The form may contain three parts: - - `metadata` where the part body is the UTF-8 JSON encoded Metadata and includes a Content-Type - header equal to `application/json; charset=utf-8` - - `contentIntent` where the part body is the content intent string of `alternate` or `original` and - includes a Content-Type header of equal to `text/plain; charset=utf-8`; must be specified if - the `content` part is specified - - `content` where the part body is the raw content bytes and includes a Content-Type header equal - to the MIME type of the content; may optionally include a Digest header with the MD5 digest of the - raw content bytes; must be specified if the `contentIntent` part is specified - requestBody: - required: true - content: - multipart/form-data: - schema: - type: object - properties: - metadata: - $ref: './images/models/metadata.v1.yaml' - contentIntent: - $ref: './images/models/contentintent.v1.yaml' - content: - $ref: './images/models/content.v1.yaml' - encoding: - metadata: - contentType: application/json; charset=utf-8 - contentIntent: - contentType: text/plain; charset=utf-8 - content: - contentType: image/jpeg, image/png - responses: - '201': - $ref: '#/components/responses/Image' - tags: - - Images - - Internal - get: - operationId: ListImages - summary: List Images - description: >- - List images for the specified user after applying all of the specified filters. - - The `status` query parameter may be specified to filter the response to only those images with the specified `status`. - The `status` query parameter may be set to one of: - - `available` - return those images with content (i.e. images where renditions can be generated) - - `created` - return those images without content - - If the `status` query parameter is not specified then the default behavior is to filter on `available` status. - This query parameter may be specified *multiple* times. - - The `contentIntent` query parameter may be specified to filter the response to only those images with content with the specified `contentIntent`. - The `contentIntent` query parameter may be set to one of: - - `alternate` - return those images with alternate content; alternate content is typically a smaller, lower resolution or lower quality version of the original content - - `original` - return those images with original content - - If the `contentIntent` query parameter is not specified then the default behavior is to not filter based upon content intent. - This query parameter may be specified *multiple* times. - The `page` and `size` query parameters may be specified to paginate the response. - - For example: - - `GET /v1/users/a43d25a01f/images` - - `GET /v1/users/a43d25a01f/images?page=4&size=50` - - `GET /v1/users/a43d25a01f/images?status=available&status=created` - - `GET /v1/users/a43d25a01f/images?contentIntent=original` - - `GET /v1/users/a43d25a01f/images?status=created&contentIntent=alternate&page=2&size=250` - parameters: - - name: status - in: query - description: >- - The status of the images to be returned. - The status of an image is initially `created` and becomes `available` when content is successfully uploaded. - If not specified, only images with `available` status are returned. - May be specified *multiple* times. - schema: - $ref: './images/models/status.v1.yaml' - - name: contentIntent - in: query - description: >- - The content intent of the images to be returned. - An image can not have content, have `alternate` content, or have `original` content. - If not specified, no filtering based upon content intent is applied. - May be specified *multiple* times. - schema: - $ref: './images/models/contentintent.v1.yaml' - - $ref: './common/parameters/paginationpage.v1.yaml' - - $ref: './common/parameters/paginationsize.v1.yaml' - responses: - '200': - description: Successfully returned user images. - content: - 'application/json': - schema: - $ref: './images/models/imagelist.v1.yaml' - tags: - - Images - - Internal - delete: - operationId: DeleteAllImages - summary: Delete All Images - description: Delete all user images, including all content and renditions. - responses: - '204': - $ref: './common/responses/nocontent.v1.yaml' - tags: - - Images - - Internal - - '/v1/images/{imageId}': - parameters: - - $ref: './images/parameters/id.v1.yaml' - delete: - operationId: DeleteImage - summary: Delete Image - description: >- - Delete the specified image, including all content and renditions. - - The `revision` query parameter may be specified to require that the current image *must* have the specified revision in order to delete the image. - If the specified `revision` does not match the actual revision of the image, then a `404` error is returned. - If used properly this can prevent accidental overwrite by multiple simultaneous updates or deletes. - parameters: - - $ref: './images/parameters/revision.v1.yaml' - responses: - '204': - $ref: './common/responses/nocontent.v1.yaml' - tags: - - Images - - Internal - get: - operationId: GetImage - summary: Get Image - description: Get the specified image. - responses: - '200': - $ref: '#/components/responses/Image' - tags: - - Images - - Internal - - '/v1/images/{imageId}/metadata': - parameters: - - $ref: './images/parameters/id.v1.yaml' - get: - operationId: GetImageMetadata - summary: Get Image Metadata - description: Get the metadata for the specified image. - responses: - '200': - description: Successfully returned metadata for the specified image. - content: - 'application/json': - schema: - $ref: './images/models/metadata.v1.yaml' - tags: - - Images - - Internal - put: - operationId: PutImageMetadata - summary: Put Image Metadata - description: >- - Update the metadata associated with the specified image. - - The update is not a wholesale replace of the entire metadata. - Each field within the metadata update replaces each field in the existing image metadata. - The `revision` query parameter may be specified to require that the current image *must* have the specified revision in order to apply the update. - If the specified `revision` does not match the actual revision of the image, then a `404` error is returned. - If used properly this can prevent accidental overwrite by multiple simultaneous updates or deletes. - parameters: - - $ref: './images/parameters/revision.v1.yaml' - requestBody: - required: true - content: - 'application/json': - schema: - $ref: './images/models/metadata.v1.yaml' - responses: - '200': - $ref: '#/components/responses/Image' - tags: - - Images - - Internal - - '/v1/images/{imageId}/content': - parameters: - - $ref: './images/parameters/id.v1.yaml' - get: - operationId: GetImageContent - summary: Get Image Content - description: >- - Get the content for specified image. - - It may be alternate or original content. - If the image does not have content then a `404` error will be returned. - responses: - '200': - $ref: '#/components/responses/ImageContent' - tags: - - Images - - Internal - - '/v1/images/{imageId}/content/{suffixOrContentIntent}': - parameters: - - $ref: './images/parameters/id.v1.yaml' - - $ref: './images/parameters/suffixorcontentintent.v1.yaml' - get: - operationId: GetImageContentWithSuffix - summary: Get Image Content (Suffix) - description: >- - Get the content for specified image with an optional suffix. - - The suffix may be any additional path segments after the required portion. - The only restriction is that if the last path segment specifies an extension (ie. contains a dot) then the extension - must match the format of the image content. - If it does not then a `404` error is returned. - - The suffix may be specified to enable sane browser downloads. - An example provides the clearest explanation. - If the `imageId` were `ac0fd9cfbc4a3d25a01fb8c390d7523b` and it contained JPEG content then these would all be valid URLs: - - - `/v1/images/ac0fd9cfbc4a3d25a01fb8c390d7523b/content` - - `/v1/images/ac0fd9cfbc4a3d25a01fb8c390d7523b/content/dog` - - `/v1/images/ac0fd9cfbc4a3d25a01fb8c390d7523b/content/cat.jpg` - - `/v1/images/ac0fd9cfbc4a3d25a01fb8c390d7523b/content/a/house` - - `/v1/images/ac0fd9cfbc4a3d25a01fb8c390d7523b/content/b/c/car.jpeg` - - If the image does not have content then a `404` error will be returned. - responses: - '200': - $ref: '#/components/responses/ImageContent' - tags: - - Images - - Internal - - put: - operationId: PutImageContent - summary: Put Image Content - description: >- - Update the image with the specified content intent and the content in - the request body. - - If the image does not already have content, then any content intent is allowed on update. - If the image already has content with `alternate` content intent, then only `original` content intent is allowed on update. - If the image already has content with `original` content intent, then any request to update the content results in a `400` error being returned. - The `revision` query parameter may be specified to require that the current image *must* have the specified revision in order to apply the update. - If the specified `revision` does not match the actual revision of the image, then a `404` error is returned. - If used properly this can prevent accidental overwrite by multiple simultaneous updates or deletes. - parameters: - - $ref: './images/parameters/revision.v1.yaml' - requestBody: - required: true - content: - 'image/jpeg': - schema: - type: string - format: binary - 'image/png': - schema: - type: string - format: binary - responses: - '200': - $ref: '#/components/responses/Image' - tags: - - Images - - Internal - - '/v1/images/{imageId}/rendition/{rendition}.{extension}': - parameters: - - $ref: './images/parameters/id.v1.yaml' - - $ref: './images/parameters/rendition.v1.yaml' - - $ref: './images/parameters/extension.v1.yaml' - get: - operationId: GetImageRendition - summary: Get Image Rendition - description: >- - Get a rendition of the image content. - - The `rendition` parameter is a sequence of key-value pairs separated by an underscore - followed by a filename `extension` parameter representing the format of the requested rendition. - These parameters are used to calculate the necessary transformations to apply to the image content before returning. - - The valid rendition parameters are: - - `w` - width - the value is an integer width of the requested rendition; if the width is not - specified then it is calculated using the height parameter and the aspect ratio of the image content - - `h` - height - the value is an integer height of the requested rendition; if the height is not - specified then it is calculated using the width parameter and the aspect ratio of the image content - - `m` - mode - the value is the mode used to transform the image content into the requested - rendition; the default mode is `fit`; the valid modes are: - - `fill` - return an image with the exact specified or calculated width and height while retaining - the aspect ratio of the image content; use only the part of the image content that fills the - specified dimensions, if necessary; only part of the image content might be visible if the requested - aspect ratio is different from the image content aspect ratio - - `fillDown` - same as `fill`, but only if requested rendition is smaller than image content; - otherwise, return the image content as-is - - `fit` - the image content is resized so that it takes up as much space as possible within a - bounding box defined by the specified or calculated width and height; the aspect ratio is - respected and all of the image content is visible - - `fitDown` - same as `fit`, but only if requested rendition is smaller than image content; - otherwise, return the image content as-is - - `pad` - resize the image to fill the specified or calculated width and height while retaining the - aspect ratio; if the proportions of the image content do not match the specified - or calculated width and height, padding using the background color is added to the image to match - the specified size - - `padDown` - same as `pad`, but only if requested rendition is smaller than image content; - otherwise, return the image content as-is - - `scale` - change the size of the image content exactly to match the specified width and height; may - not respect the image content aspect ratio; all image content parts are visible, but - might be squeezed or stretched - - `scaleDown` - same as `scale`, but only if requested rendition is smaller than image content; - otherwise, return the image content as-is - - `b` - background - the value is a string representing a 3-byte RGB or 4-byte RGBA value - for the background color; used if the transformed image content does not perfectly match the requested - rendition size or the image content is a transparent PNG and the requested rendition is a JPEG; for example: `aaccaa`, - `aaccaaff`; the alpha channel is used only when the requested renditon is a PNG; the default background is `ffffffff` - - `q` - quality - the value is an integer from 1 to 100 representing the quality of the requested rendition; - the default quality is 95; ignored if the requested format is not JPEG - - The key and value of each rendition parameter are separated by a `=` and each of those are separated by a `_`. - Only one of the width or height rendition parameters are required. - All other rendition parameters are optional. - The order of the parameters is irrelevant. - The rendition extension does *not* have to match the image content MIME type. - Any necessary conversion between image formats will be made. - This API is intended to generate a *small, single-digit* number of different renditions for each image. - Please do not use this API to generate large numbers of different renditions. - - Some examples: - - `/v1/images/ac0fd9cfbc4a3d25a01fb8c390d7523b/rendition/w=300_h=200_m=scaleDown_b=ff00ffff_q=80.jpeg` - - `/v1/images/ac0fd9cfbc4a3d25a01fb8c390d7523b/rendition/h=180_m=fit.png` - - `/v1/images/ac0fd9cfbc4a3d25a01fb8c390d7523b/rendition/w=800_h=200.jpeg` - responses: - '200': - $ref: '#/components/responses/ImageContent' - tags: - - Images - - Internal - - '/v1/images/{imageId}/rendition/{rendition}/{suffix}.{extension}': - parameters: - - $ref: './images/parameters/id.v1.yaml' - - $ref: './images/parameters/rendition.v1.yaml' - - $ref: './images/parameters/suffix.v1.yaml' - - $ref: './images/parameters/extension.v1.yaml' - get: - operationId: GetImageRenditionWithSuffix - summary: Get Image Rendition (Suffix) - description: >- - Get a rendition of the image content with an optional suffix. - - Same as Get Image Rendition with the addition of allowing for an optional suffix between - the rendition parameters and rendition extension. - The suffix may be any sequence of additional path segments. - The suffix may be specified to enable sane browser downloads. - - For example: - - `/v1/images/ac0fd9cfbc4a3d25a01fb8c390d7523b/rendition/h=180_m=fit/dog_small.png` - - `/v1/images/ac0fd9cfbc4a3d25a01fb8c390d7523b/rendition/h=180_m=fit/dog/black_lab.jpg` - responses: - '200': - $ref: '#/components/responses/ImageContent' - tags: - - Images - - Internal diff --git a/reference/images/models/base.v1.yaml b/reference/images/models/base.v1.yaml deleted file mode 100644 index 75e59bef..00000000 --- a/reference/images/models/base.v1.yaml +++ /dev/null @@ -1,23 +0,0 @@ -title: Image Base -description: >- - The read-only, base portion of an image. -type: object -properties: - id: - $ref: './id.v1.yaml' - userId: - $ref: '../../common/models/tidepooluserid.yaml' - status: - $ref: './status.v1.yaml' - createdTime: - $ref: '../../common/models/datetime.v1.yaml' - modifiedTime: - $ref: '../../common/models/datetime.v1.yaml' - revision: - $ref: './revision.v1.yaml' -required: - - id - - userId - - status - - createdTime - - revision diff --git a/reference/images/models/content.v1.yaml b/reference/images/models/content.v1.yaml deleted file mode 100644 index 18c7238d..00000000 --- a/reference/images/models/content.v1.yaml +++ /dev/null @@ -1,5 +0,0 @@ -title: Image Content -description: >- - The raw bytes of the content of the image. -type: string -format: binary diff --git a/reference/images/models/contentattributes.v1.yaml b/reference/images/models/contentattributes.v1.yaml deleted file mode 100644 index 755892dd..00000000 --- a/reference/images/models/contentattributes.v1.yaml +++ /dev/null @@ -1,24 +0,0 @@ -title: Image Content Attributes -type: object -properties: - digestMD5: - $ref: '../../common/models/digestmd5.v1.yaml' - mediaType: - $ref: './imagemediatype.v1.yaml' - width: - $ref: './width.v1.yaml' - height: - $ref: './height.v1.yaml' - size: - $ref: './size.v1.yaml' - createdTime: - $ref: '../../common/models/datetime.v1.yaml' - modifiedTime: - $ref: '../../common/models/datetime.v1.yaml' -required: - - digestMD5 - - mediaType - - width - - height - - size - - createdTime diff --git a/reference/images/models/contentintent.v1.yaml b/reference/images/models/contentintent.v1.yaml deleted file mode 100644 index 7169580d..00000000 --- a/reference/images/models/contentintent.v1.yaml +++ /dev/null @@ -1,12 +0,0 @@ -title: Image Content Intent -description: >- - The intent of the image content. - It is preferred to only upload the original image content. - In some cases, however, it is not possible to do so and a smaller, lower resolution or - lower quality alternate image content must be uploaded prior to (or instead of) uploading the - original image content. -type: string -enum: - - alternate - - original -example: 'original' diff --git a/reference/images/models/height.v1.yaml b/reference/images/models/height.v1.yaml deleted file mode 100644 index 196aaa4e..00000000 --- a/reference/images/models/height.v1.yaml +++ /dev/null @@ -1,8 +0,0 @@ -title: Image Height -description: >- - The height of the image content, in pixels. -type: integer -format: int32 -minimum: 1 -maximum: 10000 -example: 555 diff --git a/reference/images/models/id.v1.yaml b/reference/images/models/id.v1.yaml deleted file mode 100644 index a968f6b5..00000000 --- a/reference/images/models/id.v1.yaml +++ /dev/null @@ -1,6 +0,0 @@ -title: Image ID -description: >- - Image ID. -type: string -pattern: '^[0-9a-f]{32}$' -example: 'ac0fd9cfbc4a3d25a01fb8c390d7523b' diff --git a/reference/images/models/image.v1.yaml b/reference/images/models/image.v1.yaml deleted file mode 100644 index 8ea6b62b..00000000 --- a/reference/images/models/image.v1.yaml +++ /dev/null @@ -1,17 +0,0 @@ -title: Image -description: >- - An image with both metadata and content. -type: object -allOf: - - $ref: './base.v1.yaml' - - type: object - properties: - metadata: - $ref: './metadata.v1.yaml' - contentIntent: - $ref: './contentintent.v1.yaml' - contentAttributes: - $ref: './contentattributes.v1.yaml' - required: - - contentIntent - - contentAttributes diff --git a/reference/images/models/imagelist.v1.yaml b/reference/images/models/imagelist.v1.yaml deleted file mode 100644 index 21deecc8..00000000 --- a/reference/images/models/imagelist.v1.yaml +++ /dev/null @@ -1,6 +0,0 @@ -title: Image List -description: >- - An array of images. -type: array -items: - $ref: './image.v1.yaml' diff --git a/reference/images/models/imagemediatype.v1.yaml b/reference/images/models/imagemediatype.v1.yaml deleted file mode 100644 index b5063160..00000000 --- a/reference/images/models/imagemediatype.v1.yaml +++ /dev/null @@ -1,8 +0,0 @@ -title: MediaType -description: The media type of an image. -type: string -pattern: '^\w+/[-+.\w]+$' -enum: - - image/jpeg - - image/png -example: 'image/jpeg' diff --git a/reference/images/models/imagewithcontent.v1.yaml b/reference/images/models/imagewithcontent.v1.yaml deleted file mode 100644 index e6e670f4..00000000 --- a/reference/images/models/imagewithcontent.v1.yaml +++ /dev/null @@ -1,30 +0,0 @@ -title: Image with Content -description: >- - An image with just content. -type: object -allOf: - - $ref: './base.v1.yaml' - - type: object - properties: - contentIntent: - $ref: './contentintent.v1.yaml' - contentAttributes: - $ref: './contentattributes.v1.yaml' - required: - - contentIntent - - contentAttributes -example: - id: 'ac0fd9cfbc4a3d25a01fb8c390d7523b' - userId: 'a43d25a01f' - status: 'available' - createdTime: '2018-06-15T13:45:58Z' - modifiedTime: '2018-06-15T13:46:15Z' - revision: 2 - contentIntent: 'alternate' - contentAttributes: - digestMD5: HUXZLQLMuI/KZ5KDcJPcOA== - mediaType: 'image/png' - width: 400 - height: 300 - size: 125390 - createdTime: '2018-06-15T13:46:15Z' diff --git a/reference/images/models/imagewithmetadata.v1.yaml b/reference/images/models/imagewithmetadata.v1.yaml deleted file mode 100644 index fd83b339..00000000 --- a/reference/images/models/imagewithmetadata.v1.yaml +++ /dev/null @@ -1,10 +0,0 @@ -title: Image with Metadata -description: >- - An image with just metadata. -type: object -allOf: - - $ref: './base.v1.yaml' - - type: object - properties: - metadata: - $ref: './metadata.v1.yaml' diff --git a/reference/images/models/metadata.v1.yaml b/reference/images/models/metadata.v1.yaml deleted file mode 100644 index 86506822..00000000 --- a/reference/images/models/metadata.v1.yaml +++ /dev/null @@ -1,15 +0,0 @@ -title: Image Metadata -description: >- - The user metadata for an image. -type: object -properties: - name: - $ref: './name.v1.yaml' - associations: - $ref: '../../common/models/associationarray.v1.yaml' - location: - $ref: '../../common/models/location.v1.yaml' - metadata: - $ref: '../../data/models/metadata.v1.yaml' - origin: - $ref: '../../common/models/origin.v1.yaml' diff --git a/reference/images/models/name.v1.yaml b/reference/images/models/name.v1.yaml deleted file mode 100644 index 73b54753..00000000 --- a/reference/images/models/name.v1.yaml +++ /dev/null @@ -1,7 +0,0 @@ -title: Image Name -description: >- - A name for the image. -type: string -minLength: 1 -maxLength: 100 -example: 'Rover being funny!' diff --git a/reference/images/models/revision.v1.yaml b/reference/images/models/revision.v1.yaml deleted file mode 100644 index a2fa3d1e..00000000 --- a/reference/images/models/revision.v1.yaml +++ /dev/null @@ -1,6 +0,0 @@ -title: Image Revision -description: >- - The revision of an image. -type: integer -format: int32 -example: 0 diff --git a/reference/images/models/size.v1.yaml b/reference/images/models/size.v1.yaml deleted file mode 100644 index 8a8a02fe..00000000 --- a/reference/images/models/size.v1.yaml +++ /dev/null @@ -1,8 +0,0 @@ -title: Image Size -description: >- - The size of the image content, in bytes. -type: integer -format: int64 -minimum: 1 -maximum: 104857600 -example: 28348 diff --git a/reference/images/models/status.v1.yaml b/reference/images/models/status.v1.yaml deleted file mode 100644 index 3a78e954..00000000 --- a/reference/images/models/status.v1.yaml +++ /dev/null @@ -1,10 +0,0 @@ -title: Image Status -description: >- - The status of an image. - The status is `available` if and only if the image has content. - Otherwise, the status is `created`. -type: string -enum: - - available - - created -example: 'created' diff --git a/reference/images/models/suffix.v1.yaml b/reference/images/models/suffix.v1.yaml deleted file mode 100644 index 93a27e36..00000000 --- a/reference/images/models/suffix.v1.yaml +++ /dev/null @@ -1,11 +0,0 @@ -title: Image Suffix -description: >- - The suffix may be any additional path segments between the required portions. - The extension of the suffix will be used as the requested rendition format. - The only restriction is that if the last path segment contains an extension (ie. contains a dot) then the extension must match the format of the image content. - If it does not then a `404` error is returned. - The suffix may be specified to enable sane browser downloads. -type: string -minLength: 1 -pattern: '^[^.]{1,}(\..+)+$' -example: 'a/big/house.jpg' diff --git a/reference/images/models/width.v1.yaml b/reference/images/models/width.v1.yaml deleted file mode 100644 index 5913d99a..00000000 --- a/reference/images/models/width.v1.yaml +++ /dev/null @@ -1,8 +0,0 @@ -title: Image Width -description: >- - The width of the image content, in pixels. -type: integer -format: int32 -minimum: 1 -maximum: 10000 -example: 555 diff --git a/reference/images/parameters/contentintent.v1.yaml b/reference/images/parameters/contentintent.v1.yaml deleted file mode 100644 index 946c3507..00000000 --- a/reference/images/parameters/contentintent.v1.yaml +++ /dev/null @@ -1,8 +0,0 @@ -description: >- - Image Content Intent. - The intent for the content of an image. -name: contentIntent -in: path -required: true -schema: - $ref: '../models/contentintent.v1.yaml' diff --git a/reference/images/parameters/extension.v1.yaml b/reference/images/parameters/extension.v1.yaml deleted file mode 100644 index 0011d833..00000000 --- a/reference/images/parameters/extension.v1.yaml +++ /dev/null @@ -1,11 +0,0 @@ -description: >- - Image Extension. - Mime type extension of the requested rendition. -name: extension -in: path -required: true -schema: - type: string - enum: - - jpeg - - png diff --git a/reference/images/parameters/id.v1.yaml b/reference/images/parameters/id.v1.yaml deleted file mode 100644 index 918d688a..00000000 --- a/reference/images/parameters/id.v1.yaml +++ /dev/null @@ -1,8 +0,0 @@ -description: >- - Image ID. - The id of an image. -name: imageId -in: path -required: true -schema: - $ref: '../models/id.v1.yaml' diff --git a/reference/images/parameters/rendition.v1.yaml b/reference/images/parameters/rendition.v1.yaml deleted file mode 100644 index 0f1802e3..00000000 --- a/reference/images/parameters/rendition.v1.yaml +++ /dev/null @@ -1,8 +0,0 @@ -description: >- - Image Rendition. - Rendition parameters, described in the API description. -name: rendition -in: path -required: true -schema: - type: string diff --git a/reference/images/parameters/revision.v1.yaml b/reference/images/parameters/revision.v1.yaml deleted file mode 100644 index f8a3787f..00000000 --- a/reference/images/parameters/revision.v1.yaml +++ /dev/null @@ -1,8 +0,0 @@ -description: >- - Image Revision. - The revision the current image must match in order to delete the image. -name: revision -in: query -required: false -schema: - $ref: '../models/revision.v1.yaml' diff --git a/reference/images/parameters/suffix.v1.yaml b/reference/images/parameters/suffix.v1.yaml deleted file mode 100644 index 8ee51e12..00000000 --- a/reference/images/parameters/suffix.v1.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: >- - Image Suffix. - The suffix may be any additional path segments between the required portions. - The extension of the suffix will be used as the requested rendition format. - The only restriction is that if the last path segment contains an extension (ie. contains a dot) then the extension must match the format of the image content. - If it does not then a `404` error is returned. - The suffix may be specified to enable sane browser downloads. -name: suffix -in: path -required: true -schema: - $ref: '../models/suffix.v1.yaml' diff --git a/reference/images/parameters/suffixorcontentintent.v1.yaml b/reference/images/parameters/suffixorcontentintent.v1.yaml deleted file mode 100644 index 325b54f9..00000000 --- a/reference/images/parameters/suffixorcontentintent.v1.yaml +++ /dev/null @@ -1,23 +0,0 @@ -description: |- - The path segment may be one of two values, depending on the HTTP method being used. - - `GET` with Image Suffix. - The suffix may be any additional path segments between the required portions. - The extension of the suffix will be used as the requested rendition format. - The only restriction is that if the last path segment contains an extension (ie. contains a dot) then the extension must match the format of the image content. - If it does not then a `404` error is returned. - The suffix may be specified to enable sane browser downloads. - - `PUT` with Image Content Intent. - The intent for the image content. - It is preferred to only upload the original image content. - In some cases, however, it is not possible to do so and a smaller, lower resolution or - lower quality alternate image content must be uploaded prior to (or instead of) uploading the - original image content. -name: suffixOrContentIntent -in: path -required: true -schema: - oneOf: - - $ref: '../models/suffix.v1.yaml' - - $ref: '../models/contentintent.v1.yaml' From 93f2cb185b6aedd39178cc7a18117007504a9be9 Mon Sep 17 00:00:00 2001 From: Todd Kazakov Date: Thu, 14 Sep 2023 17:00:45 +0300 Subject: [PATCH 2/2] Remove images spec --- templates/openapi-merge.jsonnet | 9 --------- 1 file changed, 9 deletions(-) diff --git a/templates/openapi-merge.jsonnet b/templates/openapi-merge.jsonnet index dc30c0e2..6e6abe24 100644 --- a/templates/openapi-merge.jsonnet +++ b/templates/openapi-merge.jsonnet @@ -89,15 +89,6 @@ "excludeTags": [ std.extVar('excludeTags') ] } }, - { - "inputFile": std.extVar('sourceFolder') + "images.v1.yaml", - "dispute": { - "suffix": "_images" - }, - "operationSelection": { - "excludeTags": [ std.extVar('excludeTags') ] - } - }, { "inputFile": std.extVar('sourceFolder') + "message.v1.yaml", "dispute": {