UNPKG

saasify-to-openapi

Version:

Converts Saasify deployments to OpenAPI specs.

1,706 lines (1,685 loc) 290 kB
# Snapshot report for `test.js` The actual snapshot is saved in `test.js.snap`. Generated by [AVA](https://ava.li). ## hello-world > Snapshot 1 { components: { schemas: {}, }, info: { title: 'hello-world', version: 'v0.1.0', }, openapi: '3.0.2', paths: { '/1/call/transitive-bullshit/hello-world@6ed513d4': { get: { parameters: [ { in: 'query', name: 'name', schema: { default: 'World', type: 'string', }, }, ], responses: { 200: { content: { 'application/json': { schema: { type: 'string', }, }, }, description: 'Success', }, }, }, }, }, } ## hello-world-get > Snapshot 1 { components: { schemas: {}, }, info: { title: 'hello-world-get', version: 'v1', }, openapi: '3.0.2', paths: { '/': { get: { parameters: [ { in: 'query', name: 'name', schema: { default: 'World', type: 'string', }, }, ], responses: { 200: { content: { 'application/json': { schema: { type: 'string', }, }, }, description: 'Success', }, }, }, }, }, } ## hello-world-required-query-param > Snapshot 1 { components: { schemas: {}, }, info: { title: 'hello-world-required-query-param', version: 'v1', }, openapi: '3.0.2', paths: { '/': { get: { parameters: [ { in: 'query', name: 'name', required: true, schema: { type: 'string', }, }, ], responses: { 200: { content: { 'application/json': { schema: { type: 'string', }, }, }, description: 'Success', }, }, }, }, }, } ## imagemin > Snapshot 1 { components: { schemas: {}, }, info: { title: 'imagemin', version: 'v1', }, openapi: '3.0.2', paths: { '/': { post: { requestBody: { content: { 'application/json': { schema: { additionalProperties: false, properties: { image: { type: 'string', }, }, required: [ 'image', ], type: 'object', }, }, }, required: true, }, responses: { 200: { content: { 'application/json': { schema: { type: 'string', }, }, }, description: 'Success', }, }, }, }, }, } ## puppeteer-example > Snapshot 1 { components: { schemas: { ImageFormat: { enum: [ 'jpg', 'png', ], type: 'string', }, }, }, info: { title: 'puppeteer', version: 'v1', }, openapi: '3.0.2', paths: { '/': { post: { requestBody: { content: { 'application/json': { schema: { additionalProperties: false, properties: { type: { default: 'png', enum: [ 'jpg', 'png', ], type: 'string', }, url: { type: 'string', }, }, required: [ 'url', ], type: 'object', }, }, }, required: true, }, responses: { 200: { content: { 'application/json': { schema: { type: 'string', }, }, }, description: 'Success', }, }, }, }, }, } ## sharp > Snapshot 1 { components: { schemas: { Create: { additionalProperties: false, properties: { background: { anyOf: [ { additionalProperties: false, properties: { alpha: { type: 'number', }, b: { type: 'number', }, g: { type: 'number', }, r: { type: 'number', }, }, type: 'object', }, { type: 'string', }, ], description: 'Parsed by the [color](https://www.npmjs.org/package/color) module to extract values for red, green, blue and alpha.', }, channels: { description: 'Number of bands e.g. 3 for RGB, 4 for RGBA', enum: [ 3, 4, ], type: 'number', }, height: { description: 'Number of pixels high.', type: 'number', }, width: { description: 'Number of pixels wide.', type: 'number', }, }, required: [ 'background', 'channels', 'height', 'width', ], type: 'object', }, ExtendOptions: { additionalProperties: false, properties: { background: { anyOf: [ { additionalProperties: false, properties: { alpha: { type: 'number', }, b: { type: 'number', }, g: { type: 'number', }, r: { type: 'number', }, }, type: 'object', }, { type: 'string', }, ], description: 'Background colour, parsed by the color module, defaults to black without transparency. (optional, default {r:0,g:0,b:0,alpha:1})', }, bottom: { type: 'number', }, left: { type: 'number', }, right: { type: 'number', }, top: { type: 'number', }, }, type: 'object', }, FlattenOptions: { additionalProperties: false, properties: { background: { anyOf: [ { additionalProperties: false, properties: { alpha: { type: 'number', }, b: { type: 'number', }, g: { type: 'number', }, r: { type: 'number', }, }, type: 'object', }, { type: 'string', }, ], description: 'background colour, parsed by the color module, defaults to black. (optional, default {r:0,g:0,b:0})', }, }, type: 'object', }, ImageOperation: { additionalProperties: false, properties: { op: { enum: [ 'bandBool', 'bandbool', 'blur', 'boolean', 'composite', 'convolve', 'ensureAlpha', 'extend', 'extract', 'extractChannel', 'flatten', 'flip', 'flop', 'gamma', 'grayscale', 'greyscale', 'jpeg', 'limitInputPixels', 'linear', 'median', 'meta', 'metadata', 'modulate', 'negate', 'normalise', 'normalize', 'png', 'raw', 'recomb', 'removeAlpha', 'resize', 'rotate', 'sharpen', 'stats', 'threshold', 'tiff', 'tint', 'toColorSpace', 'toColorspace', 'toColourSpace', 'toColourspace', 'trim', 'webp', 'withMetadata', ], type: 'string', }, }, required: [ 'op', ], type: 'object', }, ImageOperationBandBool: { additionalProperties: false, properties: { boolOp: { type: 'string', }, op: { enum: [ 'bandBool', 'bandbool', 'blur', 'boolean', 'composite', 'convolve', 'ensureAlpha', 'extend', 'extract', 'extractChannel', 'flatten', 'flip', 'flop', 'gamma', 'grayscale', 'greyscale', 'jpeg', 'limitInputPixels', 'linear', 'median', 'meta', 'metadata', 'modulate', 'negate', 'normalise', 'normalize', 'png', 'raw', 'recomb', 'removeAlpha', 'resize', 'rotate', 'sharpen', 'stats', 'threshold', 'tiff', 'tint', 'toColorSpace', 'toColorspace', 'toColourSpace', 'toColourspace', 'trim', 'webp', 'withMetadata', ], type: 'string', }, }, required: [ 'boolOp', 'op', ], type: 'object', }, ImageOperationBlur: { additionalProperties: false, properties: { op: { enum: [ 'bandBool', 'bandbool', 'blur', 'boolean', 'composite', 'convolve', 'ensureAlpha', 'extend', 'extract', 'extractChannel', 'flatten', 'flip', 'flop', 'gamma', 'grayscale', 'greyscale', 'jpeg', 'limitInputPixels', 'linear', 'median', 'meta', 'metadata', 'modulate', 'negate', 'normalise', 'normalize', 'png', 'raw', 'recomb', 'removeAlpha', 'resize', 'rotate', 'sharpen', 'stats', 'threshold', 'tiff', 'tint', 'toColorSpace', 'toColorspace', 'toColourSpace', 'toColourspace', 'trim', 'webp', 'withMetadata', ], type: 'string', }, sigma: { type: 'number', }, }, required: [ 'op', ], type: 'object', }, ImageOperationBoolean: { additionalProperties: false, properties: { op: { enum: [ 'bandBool', 'bandbool', 'blur', 'boolean', 'composite', 'convolve', 'ensureAlpha', 'extend', 'extract', 'extractChannel', 'flatten', 'flip', 'flop', 'gamma', 'grayscale', 'greyscale', 'jpeg', 'limitInputPixels', 'linear', 'median', 'meta', 'metadata', 'modulate', 'negate', 'normalise', 'normalize', 'png', 'raw', 'recomb', 'removeAlpha', 'resize', 'rotate', 'sharpen', 'stats', 'threshold', 'tiff', 'tint', 'toColorSpace', 'toColorspace', 'toColourSpace', 'toColourspace', 'trim', 'webp', 'withMetadata', ], type: 'string', }, operand: { type: 'string', }, operator: { type: 'string', }, options: { additionalProperties: false, properties: { raw: { additionalProperties: false, properties: { channels: { enum: [ 1, 2, 3, 4, ], type: 'number', }, height: { type: 'number', }, width: { type: 'number', }, }, required: [ 'channels', 'height', 'width', ], type: 'object', }, }, required: [ 'raw', ], type: 'object', }, }, required: [ 'op', 'operand', 'operator', ], type: 'object', }, ImageOperationComposite: { additionalProperties: false, properties: { images: { items: { additionalProperties: false, properties: { blend: { description: 'how to blend this image with the image below. (optional, default `\'over\'`)', enum: [ 'add', 'atop', 'clear', 'colour-burn', 'colour-dodge', 'darken', 'dest', 'dest-atop', 'dest-in', 'dest-out', 'dest-over', 'difference', 'exclusion', 'hard-light', 'in', 'lighten', 'multiply', 'out', 'over', 'overlay', 'saturate', 'screen', 'soft-light', 'source', 'xor', ], type: 'string', }, density: { description: 'number representing the DPI for vector overlay image. (optional, default 72)', type: 'number', }, gravity: { description: 'gravity at which to place the overlay. (optional, default \'centre\')', type: 'string', }, input: { anyOf: [ { description: `Raw data is stored in instances of the Buffer class.␊ A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.␊ Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'`, items: { type: 'number', }, type: 'array', }, { additionalProperties: false, properties: { create: { additionalProperties: false, properties: { background: { anyOf: [ { additionalProperties: false, properties: { alpha: { type: 'number', }, b: { type: 'number', }, g: { type: 'number', }, r: { type: 'number', }, }, type: 'object', }, { type: 'string', }, ], description: 'Parsed by the [color](https://www.npmjs.org/package/color) module to extract values for red, green, blue and alpha.', }, channels: { description: 'Number of bands e.g. 3 for RGB, 4 for RGBA', enum: [ 3, 4, ], type: 'number', }, height: { description: 'Number of pixels high.', type: 'number', }, width: { description: 'Number of pixels wide.', type: 'number', }, }, required: [ 'background', 'channels', 'height', 'width', ], type: 'object', }, }, required: [ 'create', ], type: 'object', }, { type: 'string', }, ], description: 'Buffer containing image data, String containing the path to an image file, or Create object', }, left: { description: 'the pixel offset from the left edge.', type: 'number', }, premultiplied: { description: 'Set to true to avoid premultipling the image below. Equivalent to the --premultiplied vips option.', type: 'boolean', }, raw: { additionalProperties: false, description: 'describes overlay when using raw pixel data.', properties: { channels: { enum: [ 1, 2, 3, 4, ], type: 'number', }, height: { type: 'number', }, width: { type: 'number', }, }, required: [ 'channels', 'height', 'width', ], type: 'object', }, tile: { description: 'set to true to repeat the overlay image across the entire image with the given gravity. (optional, default false)', type: 'boolean', }, top: { description: 'the pixel offset from the top edge.', type: 'number', }, }, type: 'object', }, type: 'array', }, op: { enum: [ 'bandBool', 'bandbool', 'blur', 'boolean', 'composite', 'convolve', 'ensureAlpha', 'extend', 'extract', 'extractChannel', 'flatten', 'flip', 'flop', 'gamma', 'grayscale', 'greyscale', 'jpeg', 'limitInputPixels', 'linear', 'median', 'meta', 'metadata', 'modulate', 'negate', 'normalise', 'normalize', 'png', 'raw', 'recomb', 'removeAlpha', 'resize', 'rotate', 'sharpen', 'stats', 'threshold', 'tiff', 'tint', 'toColorSpace', 'toColorspace', 'toColourSpace', 'toColourspace', 'trim', 'webp', 'withMetadata', ], type: 'string', }, }, required: [ 'images', 'op', ], type: 'object', }, ImageOperationConvolve: { additionalProperties: false, properties: { kernel: { additionalProperties: false, properties: { height: { description: 'height of the kernel in pixels.', type: 'number', }, kernel: { description: 'Array of length width*height containing the kernel values.', items: { type: 'number', }, type: 'array', }, offset: { description: 'the offset of the kernel in pixels. (optional, default 0)', type: 'number', }, scale: { description: 'the scale of the kernel in pixels. (optional, default sum)', type: 'number', }, width: { description: 'width of the kernel in pixels.', type: 'number', }, }, required: [ 'height', 'kernel', 'width', ], type: 'object', }, op: { enum: [ 'bandBool', 'bandbool', 'blur', 'boolean', 'composite', 'convolve', 'ensureAlpha', 'extend', 'extract', 'extractChannel', 'flatten', 'flip', 'flop', 'gamma', 'grayscale', 'greyscale', 'jpeg', 'limitInputPixels', 'linear', 'median', 'meta', 'metadata', 'modulate', 'negate', 'normalise', 'normalize', 'png', 'raw', 'recomb', 'removeAlpha', 'resize', 'rotate', 'sharpen', 'stats', 'threshold', 'tiff', 'tint', 'toColorSpace', 'toColorspace', 'toColourSpace', 'toColourspace', 'trim', 'webp', 'withMetadata', ], type: 'string', }, }, required: [ 'kernel', 'op', ], type: 'object', }, ImageOperationEnsureAlpha: { additionalProperties: false, properties: { op: { enum: [ 'bandBool', 'bandbool', 'blur', 'boolean', 'composite', 'convolve', 'ensureAlpha', 'extend', 'extract', 'extractChannel', 'flatten', 'flip', 'flop', 'gamma', 'grayscale', 'greyscale', 'jpeg', 'limitInputPixels', 'linear', 'median', 'meta', 'metadata', 'modulate', 'negate', 'normalise', 'normalize', 'png', 'raw', 'recomb', 'removeAlpha', 'resize', 'rotate', 'sharpen', 'stats', 'threshold', 'tiff', 'tint', 'toColorSpace', 'toColorspace', 'toColourSpace', 'toColourspace', 'trim', 'webp', 'withMetadata', ], type: 'string', }, }, required: [ 'op', ], type: 'object', }, ImageOperationExtend: { additionalProperties: false, properties: { op: { enum: [ 'bandBool', 'bandbool', 'blur', 'boolean', 'composite', 'convolve', 'ensureAlpha', 'extend', 'extract', 'extractChannel', 'flatten', 'flip', 'flop', 'gamma', 'grayscale', 'greyscale', 'jpeg', 'limitInputPixels', 'linear', 'median', 'meta', 'metadata', 'modulate', 'negate', 'normalise', 'normalize', 'png', 'raw', 'recomb', 'removeAlpha', 'resize', 'rotate', 'sharpen', 'stats', 'threshold', 'tiff', 'tint', 'toColorSpace', 'toColorspace', 'toColourSpace', 'toColourspace', 'trim', 'webp', 'withMetadata', ], type: 'string', }, options: { additionalProperties: false, properties: { background: { anyOf: [ { additionalProperties: false, properties: { alpha: { type: 'number', }, b: { type: 'number', }, g: { type: 'number', }, r: { type: 'number', }, }, type: 'object', }, { type: 'string', }, ], description: 'Background colour, parsed by the color module, defaults to black without transparency. (optional, default {r:0,g:0,b:0,alpha:1})', }, bottom: { type: 'number', }, left: { type: 'number', }, right: { type: 'number', }, top: { type: 'number', }, }, type: 'object', }, }, required: [ 'op', ], type: 'object', }, ImageOperationExtract: { additionalProperties: false, properties: { op: { enum: [ 'bandBool', 'bandbool', 'blur', 'boolean', 'composite', 'convolve', 'ensureAlpha', 'extend', 'extract', 'extractChannel', 'flatten', 'flip', 'flop', 'gamma', 'grayscale', 'greyscale', 'jpeg', 'limitInputPixels', 'linear', 'median', 'meta', 'metadata', 'modulate', 'negate', 'normalise', 'normalize', 'png', 'raw', 'recomb', 'removeAlpha', 'resize', 'rotate', 'sharpen', 'stats', 'threshold', 'tiff', 'tint', 'toColorSpace', 'toColorspace', 'toColourSpace', 'toColourspace', 'trim', 'webp', 'withMetadata', ], type: 'string', }, region: { additionalProperties: false, properties: { height: { description: 'dimension of extracted image', type: 'number', }, left: { description: 'zero-indexed offset from left edge', type: 'number', }, top: { description: 'zero-indexed offset from top edge', type: 'number', }, width: { description: 'dimension of extracted image', type: 'number', }, }, required: [ 'height', 'left', 'top', 'width', ], type: 'object', }, }, required: [ 'op', 'region', ], type: 'object', }, ImageOperationExtractChannel: { additionalProperties: false, properties: { channel: { type: 'number', }, op: { enum: [ 'bandBool', 'bandbool', 'blur', 'boolean', 'composite', 'convolve', 'ensureAlpha', 'extend', 'extract', 'extractChannel', 'flatten', 'flip', 'flop', 'gamma', 'grayscale', 'greyscale', 'jpeg', 'limitInputPixels', 'linear', 'median', 'meta', 'metadata', 'modulate', 'negate', 'normalise', 'normalize', 'png', 'raw', 'recomb', 'removeAlpha', 'resize', 'rotate', 'sharpen', 'stats', 'threshold', 'tiff', 'tint', 'toColorSpace', 'toColorspace', 'toColourSpace', 'toColourspace', 'trim', 'webp', 'withMetadata', ], type: 'string', }, }, required: [ 'channel', 'op', ], type: 'object', }, ImageOperationFlatten: { additionalProperties: false, properties: { flatten: { anyOf: [ { additionalProperties: false, properties: { background: { anyOf: [ { additionalProperties: false, properties: { alpha: { type: 'number', }, b: { type: 'number', }, g: { type: 'number', }, r: { type: 'number', }, }, type: 'object', }, { type: 'string', }, ], description: 'background colour, parsed by the color module, defaults to black. (optional, default {r:0,g:0,b:0})', }, }, type: 'object', }, { type: 'boolean', }, ], }, op: { enum: [ 'bandBool', 'bandbool', 'blur', 'boolean', 'composite', 'convolve', 'ensureAlpha', 'extend', 'extract', 'extractChannel', 'flatten', 'flip', 'flop', 'gamma', 'grayscale', 'greyscale', 'jpeg', 'limitInputPixels', 'linear', 'median', 'meta', 'metadata', 'modulate', 'negate', 'normalise', 'normalize', 'png', 'raw', 'recomb', 'removeAlpha', 'resize', 'rotate', 'sharpen', 'stats', 'threshold', 'tiff', 'tint', 'toColorSpace', 'toColorspace', 'toColourSpace', 'toColourspace', 'trim', 'webp', 'withMetadata', ], type: 'string', }, }, required: [ 'op', ], type: 'object', }, ImageOperationFlip: { additionalProperties: false, properties: { flip: { type: 'boolean', }, op: { enum: [ 'bandBool', 'bandbool', 'blur', 'boolean', 'composite', 'convolve', 'ensureAlpha', 'extend', 'extract', 'extractChannel', 'flatten', 'flip', 'flop', 'gamma', 'grayscale', 'greyscale', 'jpeg', 'limitInputPixels', 'linear', 'median', 'meta', 'metadata', 'modulate', 'negate', 'normalise', 'normalize', 'png', 'raw', 'recomb', 'removeAlpha', 'resize', 'rotate', 'sharpen', 'stats', 'threshold', 'tiff', 'tint', 'toColorSpace', 'toColorspace', 'toColourSpace', 'toColourspace', 'trim', 'webp', 'withMetadata', ], type: 'string', }, }, required: [ 'op', ], type: 'object', }, ImageOperationFlop: { additionalProperties: false, properties: { flop: { type: 'boolean', }, op: { enum: [ 'bandBool', 'bandbool', 'blur', 'boolean', 'composite', 'convolve', 'ensureAlpha', 'extend', 'extract', 'extractChannel', 'flatten', 'flip', 'flop', 'gamma', 'grayscale', 'greyscale', 'jpeg', 'limitInputPixels', 'linear', 'median', 'meta', 'metadata', 'modulate', 'negate', 'normalise', 'normalize', 'png', 'raw', 'recomb', 'removeAlpha', 'resize', 'rotate', 'sharpen', 'stats', 'threshold', 'tiff', 'tint', 'toColorSpace', 'toColorspace', 'toColourSpace', 'toColourspace', 'trim', 'webp', 'withMetadata', ], type: 'string', }, }, required: [ 'op', ], type: 'object', }, ImageOperationGamma: { additionalProperties: false, properties: { gamma: { type: 'number', }, op: { enum: [ 'bandBool', 'bandbool', 'blur', 'boolean', 'composite', 'convolve', 'ensureAlpha', 'extend', 'extract', 'extractChannel', 'flatten', 'flip', 'flop', 'gamma', 'grayscale', 'greyscale', 'jpeg', 'limitInputPixels', 'linear', 'median', 'meta', 'metadata', 'modulate', 'negate', 'normalise', 'normalize', 'png', 'raw', 'recomb', 'removeAlpha', 'resize', 'rotate', 'sharpen', 'stats', 'threshold', 'tiff', 'tint', 'toColorSpace', 'toColorspace', 'toColourSpace', 'toColourspace', 'trim', 'webp', 'withMetadata', ], type: 'string', }, }, required: [ 'op', ], type: 'object', }, ImageOperationGreyscale: { additionalProperties: false, properties: { greyscale: { type: 'boolean', }, op: { enum: [ 'bandBool', 'bandbool', 'blur', 'boolean', 'composite', 'convolve', 'ensureAlpha', 'extend', 'extract', 'extractChannel', 'flatten', 'flip', 'flop', 'gamma', 'grayscale', 'greyscale', 'jpeg', 'limitInputPixels', 'linear', 'median', 'meta', 'metadata', 'modulate', 'negate', 'normalise', 'normalize', 'png', 'raw', 'recomb', 'removeAlpha', 'resize', 'rotate', 'sharpen', 'stats', 'threshold', 'tiff', 'tint', 'toColorSpace', 'toColorspace', 'toColourSpace', 'toColourspace', 'trim', 'webp', 'withMetadata', ], type: 'string', }, }, required: [ 'op', ], type: 'object', }, ImageOperationJpeg: { additionalProperties: false, properties: { op: { enum: [ 'bandBool', 'bandbool', 'blur', 'boolean', 'composite', 'convolve', 'ensureAlpha', 'extend', 'extract', 'extractChannel', 'flatten', 'flip', 'flop', 'gamma', 'grayscale', 'greyscale', 'jpeg', 'limitInputPixels', 'linear', 'median', 'meta', 'metadata', 'modulate', 'negate', 'normalise', 'normalize', 'png', 'raw', 'recomb', 'removeAlpha', 'resize', 'rotate', 'sharpen', 'stats', 'threshold', 'tiff', 'tint', 'toColorSpace', 'toColorspace', 'toColourSpace', 'toColourspace', 'trim', 'webp', 'withMetadata', ], type: 'string', }, options: { additionalProperties: false, properties: { chromaSubsampling: { description: 'Set to \'4:4:4\' to prevent chroma subsampling when quality <= 90 (optional, default \'4:2:0\')', type: 'string',