1
0
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:
chris48s
2023-08-19 05:33:27 +01:00
committed by GitHub
parent 1b792f0772
commit 692829f91c
16 changed files with 189 additions and 130 deletions

View File

@@ -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' }