[WIP] fix(api): new generated types from api schema using nodeinfo21 metadata21
This commit is contained in:
parent
ec196930ae
commit
dcff86bd55
|
@ -12927,7 +12927,7 @@ paths:
|
|||
description: ''
|
||||
/api/v2/instance/nodeinfo/2.1/:
|
||||
get:
|
||||
operationId: getNodeInfo20_2
|
||||
operationId: getNodeInfo21
|
||||
tags:
|
||||
- instance
|
||||
responses:
|
||||
|
@ -12935,7 +12935,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/NodeInfo20'
|
||||
$ref: '#/components/schemas/NodeInfo21'
|
||||
description: ''
|
||||
/api/v2/instance/settings/:
|
||||
get:
|
||||
|
@ -23124,6 +23124,124 @@ components:
|
|||
- shortDescription
|
||||
- supportedUploadExtensions
|
||||
- terms
|
||||
Metadata21:
|
||||
type: object
|
||||
properties:
|
||||
actorId:
|
||||
type: string
|
||||
private:
|
||||
type: boolean
|
||||
readOnly: true
|
||||
shortDescription:
|
||||
type: string
|
||||
readOnly: true
|
||||
longDescription:
|
||||
type: string
|
||||
readOnly: true
|
||||
contactEmail:
|
||||
type: string
|
||||
readOnly: true
|
||||
nodeName:
|
||||
type: string
|
||||
readOnly: true
|
||||
banner:
|
||||
type: string
|
||||
readOnly: true
|
||||
defaultUploadQuota:
|
||||
type: integer
|
||||
readOnly: true
|
||||
supportedUploadExtensions:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
allowList:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/AllowListStat'
|
||||
readOnly: true
|
||||
funkwhaleSupportMessageEnabled:
|
||||
type: boolean
|
||||
readOnly: true
|
||||
instanceSupportMessage:
|
||||
type: string
|
||||
readOnly: true
|
||||
usage:
|
||||
$ref: '#/components/schemas/MetadataUsage'
|
||||
languages:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
location:
|
||||
type: string
|
||||
content:
|
||||
$ref: '#/components/schemas/MetadataContent'
|
||||
features:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
codeOfConduct:
|
||||
type: string
|
||||
readOnly: true
|
||||
required:
|
||||
- actorId
|
||||
- allowList
|
||||
- banner
|
||||
- codeOfConduct
|
||||
- contactEmail
|
||||
- content
|
||||
- defaultUploadQuota
|
||||
- features
|
||||
- funkwhaleSupportMessageEnabled
|
||||
- instanceSupportMessage
|
||||
- languages
|
||||
- location
|
||||
- longDescription
|
||||
- nodeName
|
||||
- private
|
||||
- shortDescription
|
||||
- supportedUploadExtensions
|
||||
MetadataContent:
|
||||
type: object
|
||||
properties:
|
||||
local:
|
||||
$ref: '#/components/schemas/MetadataContentLocal'
|
||||
topMusicCategories:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/MetadataContentCategory'
|
||||
topPodcastCategories:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/MetadataContentCategory'
|
||||
required:
|
||||
- local
|
||||
- topMusicCategories
|
||||
- topPodcastCategories
|
||||
MetadataContentCategory:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
count:
|
||||
type: integer
|
||||
required:
|
||||
- count
|
||||
- name
|
||||
MetadataContentLocal:
|
||||
type: object
|
||||
properties:
|
||||
artists:
|
||||
type: integer
|
||||
releases:
|
||||
type: integer
|
||||
recordings:
|
||||
type: integer
|
||||
hoursOfContent:
|
||||
type: integer
|
||||
required:
|
||||
- artists
|
||||
- hoursOfContent
|
||||
- recordings
|
||||
- releases
|
||||
MetadataUsage:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -23248,6 +23366,42 @@ components:
|
|||
- software
|
||||
- usage
|
||||
- version
|
||||
NodeInfo21:
|
||||
type: object
|
||||
properties:
|
||||
version:
|
||||
type: string
|
||||
readOnly: true
|
||||
software:
|
||||
$ref: '#/components/schemas/SoftwareSerializer_v2'
|
||||
protocols:
|
||||
type: array
|
||||
items: {}
|
||||
readOnly: true
|
||||
services:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Services'
|
||||
default:
|
||||
inbound: []
|
||||
outbound: []
|
||||
openRegistrations:
|
||||
type: boolean
|
||||
readOnly: true
|
||||
usage:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Usage'
|
||||
readOnly: true
|
||||
metadata:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Metadata21'
|
||||
readOnly: true
|
||||
required:
|
||||
- metadata
|
||||
- openRegistrations
|
||||
- protocols
|
||||
- software
|
||||
- usage
|
||||
- version
|
||||
NodeInfoLibrary:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -25056,6 +25210,25 @@ components:
|
|||
required:
|
||||
- name
|
||||
- version
|
||||
SoftwareSerializer_v2:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
readOnly: true
|
||||
version:
|
||||
type: string
|
||||
repository:
|
||||
type: string
|
||||
readOnly: true
|
||||
homepage:
|
||||
type: string
|
||||
readOnly: true
|
||||
required:
|
||||
- homepage
|
||||
- name
|
||||
- repository
|
||||
- version
|
||||
SpaManifest:
|
||||
type: object
|
||||
properties:
|
||||
|
|
|
@ -126,7 +126,7 @@ class NodeInfo21(NodeInfo20):
|
|||
serializer_class = serializers.NodeInfo21Serializer
|
||||
|
||||
@extend_schema(
|
||||
responses=serializers.NodeInfo20Serializer, operation_id="getNodeInfo20"
|
||||
responses=serializers.NodeInfo21Serializer, operation_id="getNodeInfo21"
|
||||
)
|
||||
def get(self, request):
|
||||
pref = preferences.all()
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue