Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alex Gleason
pleroma
Commits
cdca62e8
Verified
Commit
cdca62e8
authored
4 years ago
by
minibikini
Browse files
Options
Downloads
Patches
Plain Diff
Add schema for Tag
parent
4c92dfb7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/pleroma/web/api_spec/schemas/status.ex
+2
-10
2 additions, 10 deletions
lib/pleroma/web/api_spec/schemas/status.ex
lib/pleroma/web/api_spec/schemas/tag.ex
+27
-0
27 additions, 0 deletions
lib/pleroma/web/api_spec/schemas/tag.ex
with
29 additions
and
10 deletions
lib/pleroma/web/api_spec/schemas/status.ex
+
2
−
10
View file @
cdca62e8
...
...
@@ -9,6 +9,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do
alias
Pleroma
.
Web
.
ApiSpec
.
Schemas
.
Emoji
alias
Pleroma
.
Web
.
ApiSpec
.
Schemas
.
FlakeID
alias
Pleroma
.
Web
.
ApiSpec
.
Schemas
.
Poll
alias
Pleroma
.
Web
.
ApiSpec
.
Schemas
.
Tag
alias
Pleroma
.
Web
.
ApiSpec
.
Schemas
.
VisibilityScope
require
OpenApiSpex
...
...
@@ -106,16 +107,7 @@ defmodule Pleroma.Web.ApiSpec.Schemas.Status do
replies_count:
%
Schema
{
type:
:integer
},
sensitive:
%
Schema
{
type:
:boolean
},
spoiler_text:
%
Schema
{
type:
:string
},
tags:
%
Schema
{
type:
:array
,
items:
%
Schema
{
type:
:object
,
properties:
%{
name:
%
Schema
{
type:
:string
},
url:
%
Schema
{
type:
:string
,
format:
:uri
}
}
}
},
tags:
%
Schema
{
type:
:array
,
items:
Tag
},
uri:
%
Schema
{
type:
:string
,
format:
:uri
},
url:
%
Schema
{
type:
:string
,
nullable:
true
,
format:
:uri
},
visibility:
VisibilityScope
...
...
This diff is collapsed.
Click to expand it.
lib/pleroma/web/api_spec/schemas/tag.ex
0 → 100644
+
27
−
0
View file @
cdca62e8
# Pleroma: A lightweight social networking server
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma
.
Web
.
ApiSpec
.
Schemas
.
Tag
do
alias
OpenApiSpex
.
Schema
require
OpenApiSpex
OpenApiSpex
.
schema
(%{
title:
"Tag"
,
description:
"Represents a hashtag used within the content of a status"
,
type:
:object
,
properties:
%{
name:
%
Schema
{
type:
:string
,
description:
"The value of the hashtag after the # sign"
},
url:
%
Schema
{
type:
:string
,
format:
:uri
,
description:
"A link to the hashtag on the instance"
}
},
example:
%{
name:
"cofe"
,
url:
"https://lain.com/tag/cofe"
}
})
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment