-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(weblinks): add weblinks route and documentation
- Loading branch information
Showing
6 changed files
with
137 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import express from 'express'; | ||
import controllers from '../commons/middlewares/crud.middlewares'; | ||
import { weblinksRepository as repository } from '../commons/repositories'; | ||
import { weblinks as resource } from '../resources'; | ||
|
||
const router = new express.Router(); | ||
|
||
router.route(`/${resource}`) | ||
.get(controllers.list(repository)); | ||
|
||
export default router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
collectionMethods: | ||
get: | ||
tags: | ||
- Weblinks | ||
summary: List all weblinks | ||
parameters: | ||
- $ref: '../../api.yml#/components/parameters/filters' | ||
- $ref: '../../api.yml#/components/parameters/skip' | ||
- $ref: '../../api.yml#/components/parameters/limit' | ||
- $ref: '../../api.yml#/components/parameters/sort' | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
data: | ||
type: array | ||
items: | ||
$ref: '../../api.yml#/components/schemas/Weblinks' | ||
totalCount: | ||
type: integer | ||
'400': | ||
$ref: '../../api.yml#/components/responses/BadRequest' | ||
'401': | ||
$ref: '../../api.yml#/components/responses/Unauthorized' | ||
'403': | ||
$ref: '../../api.yml#/components/responses/Forbidden' | ||
'500': | ||
$ref: '../../api.yml#/components/responses/ServerError' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
type: string | ||
enum: | ||
- Actualités | ||
- BSO | ||
- CanalU | ||
- Catalogue de formations | ||
- DataGouvFr | ||
- EdCF | ||
- EducPros | ||
- Espace presse | ||
- Hal | ||
- hceres | ||
- IUF | ||
- jorfsearch | ||
- LeMonde | ||
- Lieux inspirants | ||
- mooc | ||
- OE1 | ||
- OE2 | ||
- OE3 | ||
- official | ||
- Onisep | ||
- Page avec le lien vers l'organigramme | ||
- Page bilan social | ||
- Page histoire | ||
- Page liste des composantes | ||
- Page rapport d'activité | ||
- personal | ||
- Photothèque | ||
- PiaWEB | ||
- POpenData | ||
- rankingLeiden | ||
- rankingQs | ||
- rankingScimago | ||
- rankingShanghai | ||
- rankingThe | ||
- rankingUmultirank | ||
- rankingWebometrics | ||
- scanR | ||
- Service communication | ||
- ServicePublic | ||
- Services généraux | ||
- TalentCNRS | ||
- TheConversation | ||
- website | ||
- websiteCatForm | ||
- websiteDirectory | ||
- websiteGovernance | ||
- websiteOrganizationChart | ||
- websiteRss | ||
- websiteRechercheData | ||
- websiteDataWarehouse | ||
- Wikipedia |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
title: Weblinks | ||
description: Liste des sites web | ||
allOf: | ||
- type: object | ||
properties: | ||
id: | ||
type: string | ||
readOnly: true | ||
description: Unique identifier | ||
pattern: '^[a-zA-Z0-9]{15}$' | ||
resourceId: | ||
type: string | ||
readOnly: true | ||
description: Unique resource identifier | ||
pattern: '^[a-zA-Z0-9]{5}$' | ||
type: | ||
$ref: ../../api.yml#/components/schemas/WeblinksEnum | ||
value: | ||
type: string | ||
active: | ||
type: boolean | ||
startDate: | ||
type: string | ||
nullable: true | ||
pattern: '((^$)|(^\d{4}$)|(^\d{4}-(0[1-9]|1[0-2]))|(^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$))' | ||
endDate: | ||
type: string | ||
nullable: true | ||
pattern: '((^$)|(^\d{4}$)|(^\d{4}-(0[1-9]|1[0-2]))|(^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$))' | ||
- $ref: '../../api.yml#/components/schemas/Metas' |