migrate examples to openApi part 9; affects [bowerlicense conda freecodecamp galaxytoolshed jenkins-plugin npmtypedefinitions puppetforge] (#9465)

* migrate some services from examples to openApi

* update freecodecamp test/example

* improve and de-dupe service titles
This commit is contained in:
chris48s
2023-09-20 19:38:56 +01:00
committed by GitHub
parent 48049b3fab
commit 6047241891
15 changed files with 197 additions and 124 deletions

View File

@@ -1,3 +1,4 @@
import { pathParams } from '../index.js'
import NpmBase from './npm-base.js'
// For this badge to correctly detect type definitions, either the relevant
@@ -8,17 +9,17 @@ export default class NpmTypeDefinitions extends NpmBase {
static route = this.buildRoute('npm/types', { withTag: false })
static examples = [
{
title: 'npm type definitions',
pattern: ':packageName',
namedParams: { packageName: 'chalk' },
staticPreview: this.render({
supportedLanguages: ['TypeScript', 'Flow'],
}),
keywords: ['node', 'typescript', 'flow'],
static openApi = {
'/npm/types/{packageName}': {
get: {
summary: 'npm type definitions',
parameters: pathParams({
name: 'packageName',
example: 'chalk',
}),
},
},
]
}
static defaultBadgeData = {
label: 'types',