Extending apipie /dynamic bindings via a plugin

Hi,

I've tried to create a new hammer plugin for the discovery plugin, my issue
is that I can't see the discovered host in the apipie json output, I've
ensured that the API it self works directly via its routes, and I've also
stolen the snippet from foreman-tasks plugin

resource_description do
resource_id 'foreman_discovery'
api_version 'v2'
api_base_url "/foreman_discovery/api"
end

but I'm unable to see it in either apipie documentation or json output.

what am I missing?
thanks,
Ohad

Hi,

Probably this two lines https://github.com/theforeman/foreman-tasks/blob/master/lib/foreman_tasks/engine.rb#L29-L30 - basically saying apipie to include
the controllers from your engine into the documentation

– Ivan

··· ----- Original Message -----

Hi,

I’ve tried to create a new hammer plugin for the discovery plugin, my issue
is that I can’t see the discovered host in the apipie json output, I’ve
ensured that the API it self works directly via its routes, and I’ve also
stolen the snippet from foreman-tasks plugin

resource_description do
resource_id 'foreman_discovery’
api_version 'v2’
api_base_url "/foreman_discovery/api"
end

but I’m unable to see it in either apipie documentation or json output.

what am I missing?
thanks,
Ohad


You received this message because you are subscribed to the Google Groups
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-dev+unsubscribe@googlegroups.com .
For more options, visit https://groups.google.com/d/optout .

> Hi,
>
> Probably this two lines
> https://github.com/theforeman/foreman-tasks/blob/master/lib/foreman_tasks/engine.rb#L29-L30
> - basically saying apipie to include
> the controllers from your engine into the documentation
>
>
indeed! thanks, I've added support in discovery and and added a basic
hammer plugin

Thanks,
Ohad

··· On Mon, Jun 16, 2014 at 9:56 AM, Ivan Necas wrote:

– Ivan


Hi,

I’ve tried to create a new hammer plugin for the discovery plugin, my
issue is that I can’t see the discovered host in the apipie json output,
I’ve ensured that the API it self works directly via its routes, and I’ve
also stolen the snippet from foreman-tasks plugin

resource_description do
resource_id 'foreman_discovery’
api_version 'v2’
api_base_url "/foreman_discovery/api"
end

but I’m unable to see it in either apipie documentation or json output.

what am I missing?
thanks,
Ohad


You received this message because you are subscribed to the Google Groups
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.