Skip to content

Commit

Permalink
chore(collections)!: récupérer les collections
Browse files Browse the repository at this point in the history
  • Loading branch information
SEFR committed Jan 11, 2023
1 parent 36899d5 commit fa80cd3
Show file tree
Hide file tree
Showing 84 changed files with 7,297 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/api/accessibilite/content-types/accessibilite/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"kind": "singleType",
"collectionName": "accessibilites",
"info": {
"singularName": "accessibilite",
"pluralName": "accessibilites",
"displayName": "Accessibilité"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"titre": {
"type": "string"
},
"contenu": {
"type": "richtext"
}
}
}
9 changes: 9 additions & 0 deletions src/api/accessibilite/controllers/accessibilite.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

import { factories } from "@strapi/strapi";

/**
* accessibilite controller
*/

export default factories.createCoreController('api::accessibilite.accessibilite');
314 changes: 314 additions & 0 deletions src/api/accessibilite/documentation/1.0.0/accessibilite.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,314 @@
{
"/accessibilite": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccessibiliteListResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Accessibilite"
],
"parameters": [
{
"name": "sort",
"in": "query",
"description": "Sort by attributes ascending (asc) or descending (desc)",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "pagination[withCount]",
"in": "query",
"description": "Retun page/pageSize (default: true)",
"deprecated": false,
"required": false,
"schema": {
"type": "boolean"
}
},
{
"name": "pagination[page]",
"in": "query",
"description": "Page number (default: 0)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "pagination[pageSize]",
"in": "query",
"description": "Page size (default: 25)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "pagination[start]",
"in": "query",
"description": "Offset value (default: 0)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "pagination[limit]",
"in": "query",
"description": "Number of entities to return (default: 25)",
"deprecated": false,
"required": false,
"schema": {
"type": "integer"
}
},
{
"name": "fields",
"in": "query",
"description": "Fields to return (ex: title,author)",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "populate",
"in": "query",
"description": "Relations to return",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
},
{
"name": "filters",
"in": "query",
"description": "Filters to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "object"
},
"style": "deepObject"
}
],
"operationId": "get/accessibilite"
},
"put": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccessibiliteResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Accessibilite"
],
"parameters": [],
"operationId": "put/accessibilite",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccessibiliteRequest"
}
}
}
}
},
"delete": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "integer",
"format": "int64"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Accessibilite"
],
"parameters": [],
"operationId": "delete/accessibilite"
}
}
}
9 changes: 9 additions & 0 deletions src/api/accessibilite/routes/accessibilite.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

/**
* accessibilite router.
*/

import { factories } from '@strapi/strapi';

export default factories.createCoreRouter('api::accessibilite.accessibilite');
9 changes: 9 additions & 0 deletions src/api/accessibilite/services/accessibilite.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

/**
* accessibilite service.
*/

import { factories } from "@strapi/strapi";

export default factories.createCoreService('api::accessibilite.accessibilite');
Loading

0 comments on commit fa80cd3

Please sign in to comment.