migrate examples to openApi part 34; affects [github] (#9865)

* fix github service tests

* migrate some services from examples to openApi

* document latest variant with separate examples

making seperate routes for the /{version} and /latest variants
allows us to only show the docs for
- include_prereleases
- sort and
- filter
in the situation where they are relevant
This commit is contained in:
chris48s
2024-01-04 20:02:03 +00:00
committed by GitHub
parent b1f5aecf36
commit e8a148eed3
9 changed files with 215 additions and 338 deletions

View File

@@ -2,8 +2,8 @@ import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('github pull request check state')
.get('/s/pulls/badges/shields/8486.json')
.expectBadge({ label: 'checks', message: 'failure' })
.get('/s/pulls/badges/shields/9863.json')
.expectBadge({ label: 'checks', message: 'success' })
t.create('github pull request check state (pull request not found)')
.get('/s/pulls/badges/shields/5101.json')
@@ -26,5 +26,5 @@ t.create(
})
t.create('github pull request check contexts')
.get('/contexts/pulls/badges/shields/8486.json')
.expectBadge({ label: 'checks', message: '2 success, 4 failure' })
.get('/contexts/pulls/badges/shields/9863.json')
.expectBadge({ label: 'checks', message: '1 success' })