Questions tagged [laminas-api-tools]

Laminas API Tools provides both a builder and PHP runtime for HTTP APIs, using standards such as Problem Details for HTTP APIs, OAuth2, Hypertext Application Language, and others.

Laminas API Tools, formerly Apigility, provides both a builder and PHP runtime for HTTP APIs, using standards such as Problem Details for HTTP APIs, OAuth2, Hypertext Application Language, and others. It is built on top of , and is a subproject of the project.

251 questions
1
vote
1 answer

Apigility Doctrine 1 to many relationship between 2 entities

I am trying to link a one to many entity together using Doctrine in Apigility. The relationship is 1 slide has many bullets points. So I want the return json to show each slide and all its related nested bullets. But as you can see from the output…
1
vote
1 answer

Doctrine DQL join tables

for my API development I use apigility and doctrine. I'm currently programming an endpoint that users can like a post. Every post has an author. I have 2 tables with the following columns and example data inside: Action id post_id user_id …
Simon Hagmann
  • 141
  • 1
  • 12
1
vote
1 answer

Questions about ZF-Oauth "official" database schema

I have a couple of questions about zf-oauth (Apigility), and php-oauth server database schema. The database schema is: CREATE TABLE oauth_clients ( client_id VARCHAR(80) NOT NULL, client_secret VARCHAR(80) NOT NULL, redirect_uri…
1
vote
1 answer

how send $data to fetchOne apigility rest?

how can send $data (some one values->array) to Rest Apigility for make a query and return the result this is my code for send $data $body = $this->getRequest()->getContent(); $json = json_decode($body, true); $conditions =array( …
BlackHack123
  • 349
  • 1
  • 10
1
vote
1 answer

Setup Apigility on Turnkey Lamp

Hello I am testing apigility on a Turnkey Lamp stack, and I am stuck on actually getting Apigility to show me its welcome page: I want that^ Instead, upon visiting the document root of the virtual host I am using "//ipaddress:port/", I am…
Xgongiveittoya
  • 753
  • 1
  • 14
  • 33
1
vote
1 answer

How to disable Content-type check in Apigility?

There is a ContentTypeFilterListener listener that checks content-type headers in Apigility. I do not need it and is often causing an error message: Invalid content-type specified. Is there any way to completely disable this feature?
laurent
  • 88,262
  • 77
  • 290
  • 428
1
vote
2 answers

The storage configuration for OAuth2 is missing when 'config_cache_enabled' is set to true

I'm using zf2 apigility in my web application. With production mode, if config_cache_enabled is true in config/application.config.php, I get this message error when requesting access_token: The storage configuration for OAuth2 is missing If I set…
1
vote
1 answer

How to set up input validation in ZF2/Apigility, if rules are field-dependent?

There is a class Item. It has an attribute type, that can be a, b, or c. For all the types there is a common minimal set of attributes / input fields: type and other ones. Every type has some further attributes: default set of the common fields …
automatix
  • 14,018
  • 26
  • 105
  • 230
1
vote
1 answer

Apigility file upload multipart/form-data

I've got a problem with the file upload, too. I get the following JSON Response from API after submitting the form below. I'm using multipart/form-data. {validation_messages: {file_attachment: []},…} detail: "Failed Validation" status: 422 …
Simon Hagmann
  • 141
  • 1
  • 12
1
vote
1 answer

Unable to use ApiProblemListner in apigility using zf2

I am new in zendframework. I am using apigility for rest services and ApiProblemListner to return the response if any error occures. I have one function in model and this function just through an exception using php exception to use in catch block I…
PhpDev.Raj
  • 113
  • 5
1
vote
1 answer

Posting data to REST service in Cordova and Internal Server Error

I'm use Cordova 5.2.0 to create a simple mobile application for Android and I try send a POST request to the server with Apigility 1.3.1 along with an additional module called 'ZfrCors' (ZfrCors is a simple Zend Framework 2 module that helps you to…
rafalli
  • 146
  • 1
  • 7
1
vote
1 answer

How do I use application’s auth identity in Apigility?

My authentication use-case is fairly simple. I use my API only myself in the frontend of my ZF application, when a user is logged in. So any of the provided Authentication Adapters seem overkill to me. I don’t need the API to ask for credentials at…
Rob
  • 1,158
  • 1
  • 12
  • 22
1
vote
2 answers

Apigility "Error saving field" while creating "db-connected" service

When I try to create a new service using db-connected in Apigility, I'm getting the error Error saving field. After receive the error, the service is created but if I select this one, I receive the error Unable to fetch service. It seems to happen…
Alessandro Garcez
  • 728
  • 2
  • 6
  • 25
1
vote
1 answer

How to get the Doctrine cascade persisting working?

I'm working on a ZF2/Apigility application using Doctrine v2.4.2. The model structure looks like this: an Asset has an Attachment (so, it's a 1:1 relationship): The problem is that I cannot persist an Asset with an embedded Attachment and get the…
automatix
  • 14,018
  • 26
  • 105
  • 230
1
vote
1 answer

In Apigility, how do I access a DELETE request's body content

I am building an API with Apigility. I am tied to a backend, where deleting a resource requires additional data, not just the resource ID taken from the URL. So I need to read a parameter fom a DELETE request's body. While in POST request's create()…
hennzen
  • 595
  • 5
  • 15