Skip to content

Commit

Permalink
Merge pull request #17 from atlp-rwanda/ch-swagger-setup-187300232
Browse files Browse the repository at this point in the history
#187300232 correct swagger for header setup
  • Loading branch information
Eli250 authored Apr 2, 2024
2 parents d9a504a + e9af973 commit 3b00189
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 19 deletions.
27 changes: 22 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
### champs-ec-be

[![HoundCI](https://img.shields.io/badge/style--blue.svg?label=HoundCI&logo=eslint&style=flat)](https://houndci.com)
[![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)
[![Coverage Status](https://coveralls.io/repos/github/atlp-rwanda/champs-ec-be/badge.svg?branch=development)](https://coveralls.io/github/atlp-rwanda/champs-ec-be?branch=development)
![Code Climate coverage](https://img.shields.io/codeclimate/coverage/atlp-rwanda/champs-ec-be)
![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white)
![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge&logo=express&logoColor=%2361DAFB) ![CircleCI](https://img.shields.io/badge/circle%20ci-%23161616.svg?style=for-the-badge&logo=circleci&logoColor=white)
[![Maintainability](https://api.codeclimate.com/v1/badges/44cd8dee96aeb01f2dd0/maintainability)](https://codeclimate.com/github/atlp-rwanda/champs-ec-be/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/44cd8dee96aeb01f2dd0/test_coverage)](https://codeclimate.com/github/atlp-rwanda/champs-ec-be/test_coverage)
![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white) ![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge&logo=express&logoColor=%2361DAFB) ![CircleCI](https://img.shields.io/badge/circle%20ci-%23161616.svg?style=for-the-badge&logo=circleci&logoColor=white)

# champs-ec-be
# How to use the project

## How to use the project online

-

## How to run the project locally

To run the project you have to and run the following command :

- git clone https://github.com/atlp-rwanda/champs-ec-be.git
- npm install
- npm run build
- npm run dev

## To test the project you run

- npm run test
5 changes: 1 addition & 4 deletions src/validations/user.validations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ const userSchema = z.object({
password: z
.string()
.min(8, "password should be atleast 8 characters length")
.regex(
passwordStrength,
"Password sholud contain capital letter, small letter and symbol"
)
.regex(passwordStrength, "Password should be alphanumeric ")
});

export { userSchema };
20 changes: 10 additions & 10 deletions swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@
},
"servers": [
{
"url": "http://localhost:5500",
"url": "http://localhost:5000",
"description": "Development server"
},
{
"url": "https://champs-ec-be.onrender.com",
"description": "Production server (HTTPS)"
},
{
"url": "https://champs-ec-be.onrender.com",
"description": "Production server (HTTP)"
}
],
"tags": [
Expand Down Expand Up @@ -48,7 +44,11 @@
}
}
}
}

},

"security": [{ "Bearer": [] }]


}
},
Expand Down Expand Up @@ -155,10 +155,10 @@

},
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
"Bearer": {
"type": "apiKey",
"name":"Authorization",
"in": "header"
}
}
}
Expand Down

0 comments on commit 3b00189

Please sign in to comment.