Skip to content

Capability object structure #19

@Rello

Description

@Rello

Hi @tobiasKaminsky

not sure if this is meant to be like this, but the object is not nested to be parsed easily when it comes to the endpoints

            'declarativeui' => [
                'hooks' => [
                    [
                        'type' => 'context-menu',
                        'endpoints' => [
                            [
                                'name' => 'Show data in Analytics',
                                'url' => '/ocs/v2.php/apps/analytics/createFromDataFile',
                                'filter' => 'text/csv',
                            ],
                        ],
                    ],
                ],
            ],

this will return the following tree which is not good to parse, I would say:

Image

I would suggest to assign the endpoints to type

			'declarativeui' => [
				'hooks' => [
					'context-menu' => [
						'endpoints' => [
							[
								'name' => 'Show data in Analytics',
								'url' => '/ocs/v2.php/apps/analytics/createFromDataFile',
								'filter' => 'text/csv',
								'fileIdVariable' => 'fileId'
							],
						],
					],
				],
			],

this will result is a clear structure

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions