Document should NOT have additional property 'function'

Hi there
I’m creating custom field type using the forge cli template.
now i want to add a resolver function but still getting this error. error document should NOT have additional property 'function'.

What i’m doing wrong?
here is my manifest file:

modules:
  jira:customFieldType:
    - key: test-type
      name: test-type
      description: test.
      type: object
      formatter:
        expression: "`${value.value.map(e => e.label).join('-')}`"
      contextConfig:
        resource: main
        layout: basic
      edit:
        resource: edit
      resolver:
        function: resolver

resources:
  - key: main
    path: static/configurable-validation/build
  - key: edit
    path: static/edit/build
function:
  - key: resolver
    handler: index.handler
app:
  id: 
permissions:
  content:
    styles:
      - unsafe-inline
  scopes:
    - manage:jira-configuration

Thanks

Hey, @choulledigital,

I think the problem is that function should be nested inside modules, and you seem to have it at the top level.