adding endpoints for content module

This commit is contained in:
balzack 2021-12-27 15:15:54 -08:00
parent e1585536c7
commit dcc736fed7

204
api.oa3
View File

@ -26,10 +26,11 @@ tags:
- name: share - name: share
description: access control for personal subjects, associates content and contacts description: access control for personal subjects, associates content and contacts
- name: contact - name: index
description: connection to other identities, hook receiver description: connection to other identities, hook receiver
- name: content - name: content
description: posting and listing of personal subjects, group and tag managment description: posting and listing of personal subjects, group and tag managment
- name: converstaion - name: converstaion
description: group sharing of subjects description: group sharing of subjects
@ -1262,11 +1263,155 @@ paths:
'500': '500':
description: internal server error description: internal server error
# /content/articleBlocks/view - g /content/blocks/view:
# /content/articleBlocks/{articleBlockId} - g get:
# /content/articleBlocks/{articleBlockId}/view - g tags:
# /content/articles - a - content
# /content/articles/{articleId} - g,d description: Get view of content blocks
operationId: get-article-block-view
security:
- bearerAuth: []
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/View'
'401':
description: invalid password
'500':
description: internal server error
/content/blocks/{blockId}:
get:
tags:
- content
description: Get articles from specified block
operationId: get-article-block
security:
- bearerAuth: []
parameters:
- name: blockId
in: path
description: specified group id
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Article'
'401':
description: invalid password
'500':
description: internal server error
/content/blocks/{blockId}/view:
get:
tags:
- content
description: Get view articles in content block
operationId: get-article-view
security:
- bearerAuth: []
parameters:
- name: blockId
in: path
description: specified group id
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/View'
'401':
description: invalid password
'500':
description: internal server error
/content/articles:
post:
tags:
- content
description: Add an content article
operationId: add-article
security:
- bearerAuth: []
responses:
'201':
description: entry created
'401':
description: invalid token
'500':
description: internal server error
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Article'
/content/articles/{articleId}:
get:
tags:
- content
description: Get specified article
operationId: get-article
security:
- bearerAuth: []
parameters:
- name: articleId
in: path
description: specified article id
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Article'
'401':
description: invalid password
'500':
description: internal server error
delete:
tags:
- content
description: Remove specified article
operationId: remove-article
security:
- bearerAuth: []
parameters:
- name: articleId
in: path
description: specified article id
required: true
schema:
type: string
responses:
'200':
description: successful operation
'401':
description: invalid password
'500':
description: internal server error
# /content/articles/{articleId}/subject - s # /content/articles/{articleId}/subject - s
# /content/articles/{articleId}/shares/{shareId} - s,c # /content/articles/{articleId}/shares/{shareId} - s,c
# /content/articles/{articleId}/labels/{labelId} - s,c # /content/articles/{articleId}/labels/{labelId} - s,c
@ -1314,17 +1459,39 @@ externalDocs:
components: components:
schemas: schemas:
Subject: Announce:
type: object type: object
required: required:
- subjectId - appToken
properties:
appToken:
type: string
View:
type: object
required:
- id
- revision
properties:
id:
type: string
revision:
type: integer
format: int64
Post:
type: object
required:
- postId
- revision - revision
- type - type
- data - data
- created - created
- modified - modified
properties: properties:
subjectid: postId:
type: string
guid: # if null account owner is point owner
type: string type: string
revision: revision:
type: integer type: integer
@ -1337,8 +1504,6 @@ components:
type: integer type: integer
format: int32 format: int32
Article: Article:
type: object type: object
required: required:
@ -1352,7 +1517,9 @@ components:
- tagUpdated - tagUpdated
- tagRevision - tagRevision
properties: properties:
articleId: subjectId:
type: string
guid:
type: string type: string
revision: revision:
type: integer type: integer
@ -1361,7 +1528,7 @@ components:
type: string type: string
enum: [ unconfirmed, confirmed, complete, error ] enum: [ unconfirmed, confirmed, complete, error ]
subject: subject:
$ref: '#/components/schemas/Subject' $ref: '#/components/schemas/Post'
labels: labels:
type: array type: array
items: items:
@ -1373,22 +1540,13 @@ components:
tagCount: tagCount:
type: integer type: integer
format: int32 format: int32
tagUpdated: tagUpdate:
type: integer type: integer
format: int32 format: int32
tagRevision: tagRevision:
type: integer type: integer
format: int64 format: int64
Announce:
type: object
required:
- appToken
properties:
appToken:
type: string
Revsion: Revsion:
type: object type: object
required: required: