Skip to content

Commit

Permalink
fix: remove openapi from private route (#1290)
Browse files Browse the repository at this point in the history
* fix: remove openapi from private route

* fix: update snapshot
  • Loading branch information
kevbarns authored Jun 10, 2024
1 parent 5270277 commit 1c1063e
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 339 deletions.
323 changes: 0 additions & 323 deletions shared/helpers/openapi/__snapshots__/generateOpenapi.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6536,301 +6536,6 @@ Limite : 20 appel(s) / 1 seconde(s)
],
},
},
"/traininglinks": {
"post": {
"description": "Limite : 3 appel(s) / 1 seconde(s)
",
"requestBody": {
"content": {
"application/json": {
"schema": {
"items": {
"additionalProperties": false,
"properties": {
"cfd": {
"type": [
"string",
"null",
],
},
"cle_ministere_educatif": {
"type": [
"string",
"null",
],
},
"code_insee": {
"type": [
"string",
"null",
],
},
"code_postal": {
"type": [
"string",
"null",
],
},
"id": {
"type": "string",
},
"mef": {
"type": [
"string",
"null",
],
},
"rncp": {
"type": [
"string",
"null",
],
},
"uai_formateur": {
"type": [
"string",
"null",
],
},
"uai_formateur_responsable": {
"type": [
"string",
"null",
],
},
"uai_lieu_formation": {
"type": [
"string",
"null",
],
},
},
"required": [
"id",
],
"type": "object",
},
"maxItems": 100,
"type": "array",
},
},
},
"required": true,
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"items": {
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
},
"lien_lba": {
"type": "string",
},
"lien_prdv": {
"type": "string",
},
},
"required": [
"id",
"lien_prdv",
"lien_lba",
],
"type": "object",
},
"type": "array",
},
},
},
"description": "",
},
},
"security": [],
},
},
"/unsubscribe": {
"post": {
"description": "Limite : 1 appel(s) / 5 seconde(s)
",
"requestBody": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"email": {
"format": "email",
"type": "string",
},
"reason": {
"type": "string",
},
"sirets": {
"items": {
"description": "Le numéro de SIRET de l'établissement",
"example": "78424186100011",
"pattern": "^[0-9]{14}$",
"type": "string",
},
"type": [
"array",
"null",
],
},
},
"required": [
"email",
"reason",
],
"type": "object",
},
},
},
"required": true,
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"companies": {
"items": {
"additionalProperties": false,
"properties": {
"address": {
"type": "string",
},
"enseigne": {
"type": "string",
},
"siret": {
"description": "Le numéro de SIRET de l'établissement",
"example": "78424186100011",
"pattern": "^[0-9]{14}$",
"type": "string",
},
},
"required": [
"enseigne",
"siret",
"address",
],
"type": "object",
},
"type": [
"array",
"null",
],
},
"result": {
"enum": [
"OK",
"NON_RECONNU",
"ETABLISSEMENTS_MULTIPLES",
],
"type": "string",
},
},
"required": [
"result",
],
"type": "object",
},
},
},
"description": "",
},
},
"security": [],
},
},
"/updateLBB/updateContactInfo": {
"get": {
"description": "Limite : 1 appel(s) / 20 seconde(s)
",
"parameters": [
{
"in": "query",
"name": "secret",
"required": true,
"schema": {
"type": "string",
},
},
{
"description": "Le numéro de SIRET de l'établissement",
"in": "query",
"name": "siret",
"required": true,
"schema": {
"description": "Le numéro de SIRET de l'établissement",
"example": "78424186100011",
"pattern": "^[0-9]{14}$",
"type": "string",
},
},
{
"in": "query",
"name": "email",
"required": false,
"schema": {
"anyOf": [
{
"format": "email",
"type": "string",
},
{
"enum": [
"",
],
"type": "string",
},
],
},
},
{
"in": "query",
"name": "phone",
"required": false,
"schema": {
"anyOf": [
{
"type": "string",
},
{
"enum": [
"",
],
"type": "string",
},
],
},
},
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"enum": [
"OK",
],
"type": "string",
},
},
},
"description": "",
},
},
"security": [],
},
},
"/v1/application": {
"post": {
"description": "Envoi d'un email de candidature à une offre postée sur La bonne alternance recruteur ou une candidature spontanée à une entreprise identifiée par La bonne alternance.
Expand Down Expand Up @@ -9991,34 +9696,6 @@ Limite : 20 appel(s) / 1 seconde(s)
],
},
},
"/version": {
"get": {
"description": "Limite : 3 appel(s) / 1 seconde(s)
",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"additionalProperties": false,
"properties": {
"version": {
"type": "string",
},
},
"required": [
"version",
],
"type": "object",
},
},
},
"description": "",
},
},
"security": [],
},
},
},
"servers": [
{
Expand Down
4 changes: 0 additions & 4 deletions shared/routes/core.routes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { z } from "../helpers/zodWithOpenApi"
import { rateLimitDescription } from "../utils/rateLimitDescription"

import { IRoutesDef, ZResError } from "./common.routes"

Expand Down Expand Up @@ -45,9 +44,6 @@ export const zCoreRoutes = {
.strict(),
},
securityScheme: null,
openapi: {
description: `${rateLimitDescription({ max: 3, timeWindow: "1s" })}`,
},
},
},
} as const satisfies IRoutesDef
4 changes: 0 additions & 4 deletions shared/routes/trainingLinks.routes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { z } from "../helpers/zodWithOpenApi"
import { rateLimitDescription } from "../utils/rateLimitDescription"

import { IRoutesDef } from "./common.routes"

Expand Down Expand Up @@ -44,9 +43,6 @@ export const zTrainingLinksRoutes = {
),
},
securityScheme: null,
openapi: {
description: `${rateLimitDescription({ max: 3, timeWindow: "1s" })}`,
},
},
},
} as const satisfies IRoutesDef
4 changes: 0 additions & 4 deletions shared/routes/unsubscribe.routes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ZUnsubscribeQueryParams, ZUnsubscribeQueryResponse } from "../models/unsubscribeLbaCompany.model"
import { rateLimitDescription } from "../utils/rateLimitDescription"

import { IRoutesDef } from "./common.routes"

Expand All @@ -13,9 +12,6 @@ export const zUnsubscribeRoute = {
"200": ZUnsubscribeQueryResponse,
},
securityScheme: null,
openapi: {
description: `${rateLimitDescription({ max: 1, timeWindow: "5s" })}`,
},
},
},
} as const satisfies IRoutesDef
Loading

0 comments on commit 1c1063e

Please sign in to comment.