env0 / env0/serverless-openapi-typescript

unrecognized property 'documentation'

Aperta
#23 1 commento 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
14
Fork
7
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hello,
i have my serverless.ts with this function:
```
functions: {
getPatients
}
```

and the documentation section of the serverless.ts with this configuration:
```
documentation: {
version: '1',
title: 'Claire API',
description: 'Claire API',
securitySchemes: {},
security: {},
models: {}
}
```

My getPatients function is imported and has this content:

```
import schema from './schema';
import { handlerPath } from '@libs/handler-resolver';

export default {
handler: `${handlerPath(__dirname)}/handler.main`,
events: [
{
http: {
method: 'GET',
path: 'patients',
request: {
schemas: {
'application/json': schema,
},
},
}
}
],
};
```

The problem is i got this error: "Some functions have http events which are not documented: getPatients".

If i add this json to the http event:
```
documentation: {
summary: "get patients",
methodResponses: [
{
statusCode: 200,
responseBody: "OK"
}
]
},
```

then i got this error: No root type "undefined.GetPatients.Response" found.
And this warning: Invalid configuration encountered
at 'functions.getPatients.events.0.http': unrecognized property 'documentation'

Cacn anyone help me? Thank you

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.