Skip to content

Commit

Permalink
Update articles schema to fix UID pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
theorm committed Apr 4, 2024
1 parent d4bf102 commit b5b9b01
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
16 changes: 15 additions & 1 deletion src/services/articles/articles.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const findParameters: QueryParameter[] = [
},
q: {
type: 'string',
pattern: String(REGEX_UID),
pattern: String(REGEX_UID).slice(1, -1),
},
},
},
Expand Down Expand Up @@ -79,5 +79,19 @@ export const docs: ServiceSwaggerOptions = {
description: 'Find articles that match the given query',
parameters: findParameters,
},
get: {
description: 'Get an article by its UID',
parameters: [
{
in: 'path',
name: 'id',
required: true,
schema: {
type: 'string',
},
description: 'UID of the article',
},
],
},
},
};
3 changes: 1 addition & 2 deletions src/services/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { logger } from '../logger';
import media from './media';
import proxy from './proxy';

const publicApiServices = ['search', 'articles', 'users'];
const publicApiServices = ['search', 'articles', 'users', 'collectable-items'];
const internalApiServices = [
'users',
'entities',
Expand All @@ -18,7 +18,6 @@ const internalApiServices = [
'buckets-items',
'search-exporter',
'collections',
'collectable-items',
'topics',
'init',
'pages-timelines',
Expand Down

0 comments on commit b5b9b01

Please sign in to comment.