migrate examples to openApi part 18; affects [conda feedz gem openvsx readthedocs] github (#9607)

* migrate some services from examples to openApi

* fixup which --> variant param rename

* improve descriptions

* migrate gem version

* improve descriptions for ruby gems

* standardise on packageName for all conda badges
This commit is contained in:
chris48s
2023-12-23 18:19:15 +00:00
committed by GitHub
parent 188c34d7c2
commit bd288db3a4
20 changed files with 360 additions and 314 deletions

View File

@@ -1,4 +1,5 @@
import Joi from 'joi'
import { pathParams } from '../index.js'
import { isBuildStatus, renderBuildStatusBadge } from '../build-status.js'
import { GithubAuthV3Service } from './github-auth-service.js'
import { documentation, httpErrorsFor } from './github-helpers.js'
@@ -14,47 +15,28 @@ export default class GithubChecksStatus extends GithubAuthV3Service {
pattern: ':user/:repo/:ref',
}
static examples = [
{
title: 'GitHub branch checks state',
namedParams: {
user: 'badges',
repo: 'shields',
ref: 'master',
static openApi = {
'/github/checks-status/{user}/{repo}/{ref}': {
get: {
summary: 'GitHub tag checks state',
description: documentation,
parameters: pathParams(
{
name: 'user',
example: 'badges',
},
{
name: 'repo',
example: 'shields',
},
{
name: 'ref',
example: '3.3.0',
},
),
},
staticPreview: renderBuildStatusBadge({
status: 'success',
}),
keywords: ['status'],
documentation,
},
{
title: 'GitHub commit checks state',
namedParams: {
user: 'badges',
repo: 'shields',
ref: '91b108d4b7359b2f8794a4614c11cb1157dc9fff',
},
staticPreview: renderBuildStatusBadge({
status: 'success',
}),
keywords: ['status'],
documentation,
},
{
title: 'GitHub tag checks state',
namedParams: {
user: 'badges',
repo: 'shields',
ref: '3.3.0',
},
staticPreview: renderBuildStatusBadge({
status: 'success',
}),
keywords: ['status'],
documentation,
},
]
}
static defaultBadgeData = { label: 'checks' }