You've already forked nginx-proxy-manager
mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-11-01 05:31:05 +03:00
22 lines
609 B
JavaScript
22 lines
609 B
JavaScript
/// <reference types="cypress" />
|
|
|
|
const SWAGGER_SCHEMA_FILENAME = 'results/swagger-schema.json';
|
|
|
|
describe('Swagger Schema Linting', () => {
|
|
it('Should be a completely valid schema', () => {
|
|
// Save the schema to a file and lint it
|
|
cy.request('/api/schema')
|
|
.then((response) => {
|
|
const fileContent = response.body;
|
|
cy.writeFile(SWAGGER_SCHEMA_FILENAME, fileContent);
|
|
})
|
|
.then(() => {
|
|
cy.exec(`yarn swagger-lint '${SWAGGER_SCHEMA_FILENAME}'`)
|
|
.then((result) => {
|
|
cy.log("Swagger Vacuum Results:\n", result.stdout);
|
|
expect(result.code).to.eq(0);
|
|
});
|
|
});
|
|
});
|
|
});
|