MCPcopy
hub / github.com/Surnet/swagger-jsdoc / format

Function format

src/specification.js:73–78  ·  view source on GitHub ↗

* @param {object} obj * @param {string} ext

(swaggerObject, ext)

Source from the content-addressed store, hash-verified

71 * @param {string} ext
72 */
73function format(swaggerObject, ext) {
74 if (ext === '.yml' || ext === '.yaml') {
75 return YAML.stringify(swaggerObject);
76 }
77 return swaggerObject;
78}
79
80/**
81 * OpenAPI specification validator does not accept empty values for a few properties.

Callers 1

finalizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected