Skip to content

Commit

Permalink
[HTTP/OAS] Add descriptions for short URL APIs (elastic#184267)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored May 27, 2024
1 parent 099e79a commit a79edf1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export const registerCreateRoute = (router: IRouter, url: ServerUrlService) => {
router.post(
{
path: '/api/short_url',
options: {
access: 'public',
description: `Create a short URL`,
},
validate: {
body: schema.object({
locatorId: schema.string({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export const registerDeleteRoute = (router: IRouter, url: ServerUrlService) => {
router.delete(
{
path: '/api/short_url/{id}',
options: {
access: 'public',
description: `Delete a short URL`,
},
validate: {
params: schema.object({
id: schema.string({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export const registerGetRoute = (router: IRouter, url: ServerUrlService) => {
router.get(
{
path: '/api/short_url/{id}',
options: {
access: 'public',
description: `Get a short URL`,
},
validate: {
params: schema.object({
id: schema.string({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export const registerResolveRoute = (router: IRouter, url: ServerUrlService) =>
router.get(
{
path: '/api/short_url/_slug/{slug}',
options: {
access: 'public',
description: `Resolve a short URL`,
},
validate: {
params: schema.object({
slug: schema.string({
Expand Down

0 comments on commit a79edf1

Please sign in to comment.