model Foo {}
op foo(@query q: string, @header h: string, @body body: Foo): void;
Service method parameters:
- q: string
- h: string
- body: Foo {}
Service operation:
- parameters
- q: string
- h: string
- bodyParam: Foo {}
Mapping:
- q -> q
- h -> h
- bodyParam -> body
Generated models:
- Foo
model Inner {
@header
h: string;
prop: string;
}
op foo(@query q: string, outer: string, inner: Inner): void;
Service method parameters:
- q: string
- outer: string
- inner: Inner {h: string, prop: string}
Service operation:
- parameters
- q: string
- h: string
- bodyParam: FooRequest {outer: string, inner: Inner {h: string, prop: string}}
Mapping:
- q -> q
- bodyParam.outer -> outer
- bodyParam.inner -> inner
- h -> inner.h
Generated models:
- Inner
- FooRequest
model Inner {
@header
h: string;
prop: string;
}
op foo(@bodyRoot body: {@query q: string, outer: string, inner: Inner}): void;
Service method parameters:
- body: FooRequest {q: string, outer: string, inner: Inner {h: string, prop: string}}
Service operation:
- parameters
- q: string
- h: string
- bodyParam: FooRequest {q: string, outer: string, inner: Inner {h: string, prop: string}}
Mapping:
- q -> body.q
- h -> body.inner.h
- bodyParam -> body
Generated models:
- FooRequest
- Inner
model Wrapper {
@query
q: string;
outer: string;
inner: Foo;
}
model Foo {
@header
h: string;
prop: string;
}
op foo(...Wrapper): void;
Service method parameters:
- q: string
- outer: string
- inner: Inner {h: string, prop: string}
Service operation:
- parameters
- q: string
- h: string
- bodyParam: FooRequest {outer: string, inner: Inner {h: string, prop: string}}
Mapping:
- q -> q
- bodyParam.outer -> outer
- bodyParam.inner -> inner
- h -> inner.h
Generated models:
- Inner
- FooRequest
model Foo {}
op foo(): {@header h: string, @body body: Foo};
Service method response:
- FooResponse {h: string, body: Foo{}}
Service operation response:
- headers
- h: string
- body: Foo {}
Mapping:
- h -> FooResponse.h
- body -> FooResponse.body
Generated models:
- FooResponse
- Foo
model Inner {
@header
h: string;
prop: string;
}
op foo(): {@header oh: string, outer: string, inner: Inner};
Service method response:
- FooReturn {oh: string, outer: string, inner: Inner {h: string, prop: string}}
Service operation response:
- headers
- oh: string
- h: string
- body: FooResponse {outer: string, inner: Inner {h: string, prop: string}}
Mapping:
- oh -> FooResponseSource.oh
- h -> FooResponseSource.inner.h
- body.outer -> FooResponseSource.outer
- body.inner -> FooResponseSource.inner
Generated models:
- Inner
- FooResponse
- FooReturn
model Inner {
@header
h: string;
prop: string;
}
op foo(): {@bodyRoot body: {@header oh: string, outer: string, inner: Inner}};
Service method response:
- FooReturn {body: FooResponse {oh: string, outer: string, inner: Inner {h: string, prop: string}}
Service operation response:
- headers
- oh: string
- h: string
- body: FooResponse {oh: string, outer: string, inner: Inner {h: string, prop: string}}
Mapping:
- oh -> FooResponse.body.oh
- h -> FooResponse.body.inner.h
- body-> FooResponse
Generated models:
- Inner
- FooResponse
- FooReturn