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:
@@ -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' }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user