https://github.com/fajarbc/cypress-api-automation
API Automation with Cypress
https://github.com/fajarbc/cypress-api-automation
ajv api-automation cypress
Last synced: 9 months ago
JSON representation
API Automation with Cypress
- Host: GitHub
- URL: https://github.com/fajarbc/cypress-api-automation
- Owner: fajarbc
- Created: 2022-09-13T08:12:32.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-23T15:32:33.000Z (over 3 years ago)
- Last Synced: 2025-01-17T13:48:26.646Z (over 1 year ago)
- Topics: ajv, api-automation, cypress
- Language: JavaScript
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cyress API Automation
## Description
API Automation with Cypress.
Include: JSON Schema Validation using [Ajv](https://ajv.js.org).
Example case: [`pokeapi`](https://pokeapi.co/)
## Generate JSON Schema
File location: `schema/pokeapi-schema.json`
To generate schema.json, paste your example json data in [json-to-schema-converter](https://www.liquid-technologies.com/online-json-to-schema-converter).
Before you click generate, make sure the **Array rules** is **List Validation** in the Options tab. Generate, copy and paste the result in to the `pokeapi-schema.json` file, but remove the line
```
"$schema": "http://json-schema.org/draft-04/schema#",
```
## Install
```
npm install
```
*Note*: It may take a while if you havo no Cypress installed in your machine
## Run
```
npm start
```