Curious on the process for extending API routes

Hello,

I’m interested in trying to understand how to register API routes in Corteza.

I working through the documentation here:

https://docs.cortezaproject.org/corteza-docs/2021.9/developer-guide/corteza-server/codegen.html#_running_codegen

I have a route registered in the server by modifying the yaml file and running the make codegen command. Then I ran codegen:corteza-api-client to create the route in the corteza-js project. I linked the packages and confirmed the changes with some console.logs in the compose project, but do not see the route registered in the ComposeAPI object (attached screenshot)

image

What am I missing?

Thanks so much.

You need to link corteza-js and corteza-vue also – those API clients are registered as plugins via the corteza-vue plugin.

So:

  1. build corteza-js
  2. link into corteza-vue
  3. build corteza-vue
  4. link both corteza-js and corteza-vue into the webapp.

(linking only needs to be done once).