[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: ''
|
description: ''
|
||||||
/api/v2/instance/nodeinfo/2.1/:
|
/api/v2/instance/nodeinfo/2.1/:
|
||||||
get:
|
get:
|
||||||
operationId: getNodeInfo20_2
|
operationId: getNodeInfo21
|
||||||
tags:
|
tags:
|
||||||
- instance
|
- instance
|
||||||
responses:
|
responses:
|
||||||
|
@ -12935,7 +12935,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/NodeInfo20'
|
$ref: '#/components/schemas/NodeInfo21'
|
||||||
description: ''
|
description: ''
|
||||||
/api/v2/instance/settings/:
|
/api/v2/instance/settings/:
|
||||||
get:
|
get:
|
||||||
|
@ -23124,6 +23124,124 @@ components:
|
||||||
- shortDescription
|
- shortDescription
|
||||||
- supportedUploadExtensions
|
- supportedUploadExtensions
|
||||||
- terms
|
- 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:
|
MetadataUsage:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -23248,6 +23366,42 @@ components:
|
||||||
- software
|
- software
|
||||||
- usage
|
- usage
|
||||||
- version
|
- 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:
|
NodeInfoLibrary:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -25056,6 +25210,25 @@ components:
|
||||||
required:
|
required:
|
||||||
- name
|
- name
|
||||||
- version
|
- 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:
|
SpaManifest:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|
|
@ -126,7 +126,7 @@ class NodeInfo21(NodeInfo20):
|
||||||
serializer_class = serializers.NodeInfo21Serializer
|
serializer_class = serializers.NodeInfo21Serializer
|
||||||
|
|
||||||
@extend_schema(
|
@extend_schema(
|
||||||
responses=serializers.NodeInfo20Serializer, operation_id="getNodeInfo20"
|
responses=serializers.NodeInfo21Serializer, operation_id="getNodeInfo21"
|
||||||
)
|
)
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
pref = preferences.all()
|
pref = preferences.all()
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue