mirror of
https://github.com/badges/shields.git
synced 2025-11-09 12:40:59 +03:00
migrate examples to openApi part 6; affects [opencollective opm ossf powershell pub pypi reddit repology] (#9462)
* migrate some services from examples to openApi * improve and de-dupe service titles
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { pathParams } from '../index.js'
|
||||
import PypiBase from './pypi-base.js'
|
||||
import { parseClassifiers } from './pypi-helpers.js'
|
||||
|
||||
@@ -6,15 +7,17 @@ export default class PypiImplementation extends PypiBase {
|
||||
|
||||
static route = this.buildRoute('pypi/implementation')
|
||||
|
||||
static examples = [
|
||||
{
|
||||
title: 'PyPI - Implementation',
|
||||
pattern: ':packageName',
|
||||
namedParams: { packageName: 'Django' },
|
||||
staticPreview: this.render({ implementations: ['cpython'] }),
|
||||
keywords: ['python'],
|
||||
static openApi = {
|
||||
'/pypi/implementation/{packageName}': {
|
||||
get: {
|
||||
summary: 'PyPI - Implementation',
|
||||
parameters: pathParams({
|
||||
name: 'packageName',
|
||||
example: 'Django',
|
||||
}),
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'implementation' }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user