migrate examples to openApi part 2; affects [archlinux bitcomponents bountysource cdnjs chrome clearlydefined clojars cocoapods coincap] (#9428)

* convert an example that doesn't matter

* migrate some services from examples to openApi

* improve and de-dupe service titles

* revert changes to codefactor
This commit is contained in:
chris48s
2023-08-09 00:57:47 +01:00
committed by GitHub
parent 7d966ab6bd
commit b2f47a3303
17 changed files with 209 additions and 122 deletions

View File

@@ -1,6 +1,6 @@
import Joi from 'joi'
import { metric } from '../text-formatters.js'
import { BaseJsonService } from '../index.js'
import { BaseJsonService, pathParams } from '../index.js'
const schema = Joi.object({ activity_total: Joi.number().required() })
@@ -8,13 +8,17 @@ export default class Bountysource extends BaseJsonService {
static category = 'funding'
static route = { base: 'bountysource/team', pattern: ':team/activity' }
static examples = [
{
title: 'Bountysource',
namedParams: { team: 'mozilla-core' },
staticPreview: this.render({ total: 53000 }),
static openApi = {
'/bountysource/team/{team}/activity': {
get: {
summary: 'Bountysource',
parameters: pathParams({
name: 'team',
example: 'mozilla-core',
}),
},
},
]
}
static defaultBadgeData = { label: 'bounties' }