Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unrecognized property 'documentation' #23

Open
gianlucainnocentevegans opened this issue Jun 1, 2022 · 1 comment
Open

unrecognized property 'documentation' #23

gianlucainnocentevegans opened this issue Jun 1, 2022 · 1 comment

Comments

@gianlucainnocentevegans
Copy link

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

@djMax
Copy link

djMax commented Apr 6, 2023

@gianlucainnocentevegans did you ever figure this out? Same thing is happening to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants