Skip to content

Commit 54de823

Browse files
committed
Fix compiler tests
1 parent 82886c3 commit 54de823

File tree

8 files changed

+26
-63
lines changed

8 files changed

+26
-63
lines changed

compiler/src/model/build-model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ function compileClassOrInterfaceDeclaration (declaration: ClassDeclaration | Int
241241
assert(
242242
pathMember as Node,
243243
urlTemplateParams.includes(part.name),
244-
`The property '${part.name}' does not exist in the rest-api-spec ${namespace} url template`
244+
`The property '${part.name}' does not exist in the url template`
245245
)
246246
if (type.query.map(p => p.name).includes(part.name)) {
247247
const queryType = type.query.find(property => property != null && property.name === part.name) as model.Property
@@ -589,7 +589,7 @@ function visitRequestOrResponseProperty (member: PropertyDeclaration | PropertyS
589589
* ```
590590
* urls: [
591591
* {
592-
* /** @deprecated 1.2.3 Use something else
592+
* /** \@deprecated 1.2.3 Use something else
593593
* path: '/some/path',
594594
* methods: ["GET", "POST"]
595595
* }

compiler/test/body-codegen-name/specification/_global/index/request.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
* @doc_id docs-index
2424
*/
2525
export interface Request {
26+
urls: [
27+
{
28+
path: '/foo',
29+
methods: ['POST']
30+
}
31+
]
2632
body: Foo
2733
}
2834

compiler/test/duplicate-body-codegen-name/specification/_global/index/request.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
* @doc_id docs-index
2424
*/
2525
export interface Request {
26+
urls: [
27+
{
28+
path: "/foo/{id}"
29+
methods: ["POST"]
30+
}
31+
]
2632
path_parts: {
2733
id: string
2834
}

compiler/test/no-body/specification/_global/info/request.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
* @doc_id api-root
2424
*/
2525
export interface Request {
26+
urls: [
27+
{
28+
path: "/foo"
29+
methods: ["GET"]
30+
}
31+
]
2632
body: {
2733
foo: string
2834
}

compiler/test/request-availability/specification/_global/index/request.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
* @doc_id docs-index
2525
*/
2626
export interface Request<TDocument> {
27+
urls: [
28+
{
29+
path: '/{index}/_doc/{id}'
30+
methods: ['POST', 'PUT']
31+
}
32+
]
2733
path_parts: {
2834
id?: string
2935
index: string

compiler/test/wrong-api-name/specification/_global/info/request.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

compiler/test/wrong-api-name/specification/tsconfig.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

compiler/test/wrong-api-name/test.ts

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)