migrate examples to openApi part5; affects [itunes jetbrains jitpack keybase lemmy luarocks maintenance openvsx] (#9431)
* migrate some services from examples to openApi * improve and de-dupe service titles * revert changes to jsdelivr * Update services/jetbrains/jetbrains-downloads.service.js Co-authored-by: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com> --------- Co-authored-by: Pierre-Yves Bigourdan <10694593+PyvesB@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import Joi from 'joi'
|
||||
import { renderVersionBadge } from '../version.js'
|
||||
import { BaseJsonService } from '../index.js'
|
||||
import { BaseJsonService, pathParams } from '../index.js'
|
||||
|
||||
const schema = Joi.object({
|
||||
version: Joi.string().required(),
|
||||
@@ -17,17 +17,23 @@ export default class JitPackVersion extends BaseJsonService {
|
||||
pattern: ':groupId/:artifactId',
|
||||
}
|
||||
|
||||
static examples = [
|
||||
{
|
||||
title: 'JitPack',
|
||||
namedParams: {
|
||||
groupId: 'com.github.jitpack',
|
||||
artifactId: 'maven-simple',
|
||||
static openApi = {
|
||||
'/jitpack/version/{groupId}/{artifactId}': {
|
||||
get: {
|
||||
summary: 'JitPack',
|
||||
parameters: pathParams(
|
||||
{
|
||||
name: 'groupId',
|
||||
example: 'com.github.jitpack',
|
||||
},
|
||||
{
|
||||
name: 'artifactId',
|
||||
example: 'maven-simple',
|
||||
},
|
||||
),
|
||||
},
|
||||
staticPreview: renderVersionBadge({ version: 'v1.1' }),
|
||||
keywords: ['java', 'maven'],
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
static defaultBadgeData = { label: 'jitpack' }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user