migrate examples to openApi part 7; affects [reuse sourceforge sourcegraph spack stackexchange testspace treeware twitch] (#9464)

* migrate some services from examples to openApi

* capitalize all words in sourceforge titles
This commit is contained in:
chris48s
2023-09-04 11:02:05 +01:00
committed by GitHub
parent d1798167cc
commit 0bc512707f
15 changed files with 189 additions and 138 deletions

View File

@@ -1,4 +1,5 @@
import Joi from 'joi'
import { pathParams } from '../index.js'
import { renderVersionBadge } from '../version.js'
import TwitchBase from './twitch-base.js'
@@ -17,15 +18,17 @@ export default class TwitchExtensionVersion extends TwitchBase {
pattern: ':extensionId',
}
static examples = [
{
title: 'Twitch Extension Version',
namedParams: {
extensionId: '2nq5cu1nc9f4p75b791w8d3yo9d195',
static openApi = {
'/twitch/extension/v/{extensionId}': {
get: {
summary: 'Twitch Extension Version',
parameters: pathParams({
name: 'extensionId',
example: '2nq5cu1nc9f4p75b791w8d3yo9d195',
}),
},
staticPreview: renderVersionBadge({ version: '1.0.0' }),
},
]
}
static defaultBadgeData = {
label: 'twitch extension',