Skip to content
This repository was archived by the owner on May 12, 2025. It is now read-only.

Commit 5e8a739

Browse files
committed
fix failing test
1 parent 9e05848 commit 5e8a739

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

example/src/routes/pet.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@ const { Router } = require('express');
22

33
const router = Router();
44

5+
/* block comments aren't parsed */
6+
57
/**
6-
* GET /hello-world
7-
* @summary Hello World
8-
* @response 200 - OK
8+
* Doc comments are only parsed if they have `METHOD /path` at the top of the
9+
* comment.
910
*/
1011

11-
/* block comment */
12-
1312
/**
14-
* Doc comment
13+
* For example, this comment is ignored.
14+
* GET /hello/world
15+
* @summary Says hello
16+
* @response 200 - OK
1517
*/
1618

1719
/**

openapi-ui-express/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openapi-ui-express",
3-
"version": "0.0.7",
3+
"version": "0.0.8",
44
"license": "MIT",
55
"dependencies": {
66
"express": "^4.17.1"

src/util/commentsToOpenApi.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ describe('commentsToOpenApi', () => {
264264
*/
265265
});
266266

267-
// TODO: this isn't valid openapi, schema isn't allowed here.
268267
const expected = {
269268
paths: {
270269
'/hello': {

0 commit comments

Comments
 (0)