Files
shields/services/dynamic/dynamic-yaml.service.js
Caleb Cartwright ac54dd3ced convert some service classes to static props, run [drone dub dynamic] (#5543)
* refactor(drone): convert to static props

* refactor(dub): convert to static props

* refactor(dynamic): convert to static props
2020-09-15 01:42:57 +00:00

20 lines
532 B
JavaScript

'use strict'
const { MetricNames } = require('../../core/base-service/metric-helper')
const { BaseYamlService } = require('..')
const { createRoute } = require('./dynamic-helpers')
const jsonPath = require('./json-path')
module.exports = class DynamicYaml extends jsonPath(BaseYamlService) {
static enabledMetrics = [MetricNames.SERVICE_RESPONSE_SIZE]
static route = createRoute('yaml')
async fetch({ schema, url, errorMessages }) {
return this._requestYaml({
schema,
url,
errorMessages,
})
}
}