mirror of
https://github.com/LukeHagar/pypistats.dev.git
synced 2025-12-06 04:21:09 +00:00
Upgrade OpenAPI version to 3.1.0 and expand API documentation with additional query parameters and response formats. Remove deprecated cache, cron, and data processing endpoints for cleaner codebase.
This commit is contained in:
39
openapi.yaml
39
openapi.yaml
@@ -1,4 +1,4 @@
|
||||
openapi: 3.0.3
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: PyPI Stats API
|
||||
version: 1.0.0
|
||||
@@ -237,7 +237,7 @@ paths:
|
||||
- in: path
|
||||
name: type
|
||||
required: true
|
||||
schema: { type: string, enum: [overall, python_major, python_minor, system] }
|
||||
schema: { type: string, enum: [overall, python_major, python_minor, system, installer, version] }
|
||||
- in: query
|
||||
name: chart
|
||||
schema: { type: string, enum: [line, bar] }
|
||||
@@ -254,17 +254,50 @@ paths:
|
||||
name: os
|
||||
schema: { type: string, enum: [Windows, Linux, Darwin, other] }
|
||||
description: Only for type=system
|
||||
- in: query
|
||||
name: format
|
||||
schema: { type: string, enum: [json, data] }
|
||||
description: Return JSON payload for interactive charts instead of a PNG image
|
||||
- in: query
|
||||
name: nocache
|
||||
schema: { type: string }
|
||||
description: Set to '1' to bypass server-side chart cache
|
||||
- in: query
|
||||
name: cache
|
||||
schema: { type: string }
|
||||
description: Set to 'false' to bypass server-side chart cache
|
||||
responses:
|
||||
'200':
|
||||
description: PNG image
|
||||
description: PNG image by default, or JSON when format=json
|
||||
content:
|
||||
image/png:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
package: { type: string }
|
||||
type: { type: string }
|
||||
chartType: { type: string, enum: [line, bar] }
|
||||
title: { type: string }
|
||||
labels:
|
||||
type: array
|
||||
items: { type: string }
|
||||
datasets:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
label: { type: string }
|
||||
data:
|
||||
type: array
|
||||
items: { type: number }
|
||||
'400': { description: Bad request }
|
||||
'404': { description: Package not found }
|
||||
|
||||
|
||||
components:
|
||||
securitySchemes: {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user