Implementation to visit all operations and models
This commit is contained in:
Родитель
2651269740
Коммит
ba3de996f6
|
@ -43,6 +43,10 @@ export function getQueryParamName(entity: Type) {
|
|||
return queryFields.get(entity);
|
||||
}
|
||||
|
||||
export function isQueryParam(entity: Type) {
|
||||
return queryFields.has(entity);
|
||||
}
|
||||
|
||||
const pathFields = new Map<Type, string>();
|
||||
export function path(program: Program, entity: Type, paramName: string) {
|
||||
if (!paramName && entity.kind === "ModelProperty") {
|
||||
|
@ -55,6 +59,10 @@ export function getPathParamName(entity: Type) {
|
|||
return pathFields.get(entity);
|
||||
}
|
||||
|
||||
export function isPathParam(entity: Type) {
|
||||
return pathFields.has(entity);
|
||||
}
|
||||
|
||||
const bodyFields = new Set<Type>();
|
||||
export function body(program: Program, entity: Type) {
|
||||
bodyFields.add(entity);
|
||||
|
|
Загрузка…
Ссылка в новой задаче