Api-Platform 3: DataTransformerInterface Issue - api-platform.com

I am learning to create DTO and DataTransformerInterface to send specific data in my response.
The issue is that the file "DataTransformerInterface" is missing.
When I checked the "Api-Platform" folder, the Core folder is missing and when I verified on the git repository, the core folder is not available there.
I have searched through vendor and the file could not be found.
Did anybody run into this problem and manage to solve it ?

There is no more DataTransformerInterface in API-Platform 3.
You should implement your logic inside a stateProvider or a stateProcessor instead.
Look at this.

Related

Run multiple azure function projects on same solution

I am trying to run multiple azure projects localhost on same solution but getting issue for dependency injection because it overwrites "startup.cs"
for example.
Solution
FunctionApp1 --> startup.cs
FunctionApp2 --> startup.cs
But when it executes FunctionApp2 is using startup.cs from FunctionApp1.
I guess there might be some incorrect settings in your function app. Possible reasons are as below:
1.In the Startup.cs, check if you're calling the correct Startup method in [assembly:xxx]. For example, in FunctionApp2(suppose the namespace is also FunctionApp2) -> Startup.cs, you're using FunctionApp1's Startup method in [assembly:xxx], like [assembly: FunctionsStartup(typeof(FunctionApp1.Startup))]. This may happen when you reference the project FunctionApp1 in FunctionApp2.
2.Or this might be a temp issue. You can create a new solution, and create 2 new function apps, this may resolve the issue.
3.Or you're using some old packages. Please use the latest packages for your functions.
And I think the reason 1 may be the root cause. Please let me know if you still have the same issue after checking the above steps.

Call services from workflow

I am trying to set up a workflow were the content item is either deleted or moved to another folder, if rejected. No wfFunctions seems to be able to do this, only thing related to deleting content is the services, specifically the DELETE_DOC service. But i can't seem to figure out how to call it from the workflow step.
Related question: I have tried to wfUpdateMetaData on the xCollectionID, with no result. Is there a metadata/path i can change to move the file.
Thank you in advance
You should be able to move the item by updating the folder. Note that wfUpdateMetaData will only update the latest revision.
Some additional reading:
https://jonathanhult.com/blog/2015/10/update-folder-during-workflow-webcenter-content/
https://bitbucket.org/mythics/bypassworkfloweditrestrictions

Location of drools-spring.xsd on git hub (or reliable source)

My project depends on drools 5.6.0.Final version. As part of that I'm trying to find a uri that I can rely for the drools-spring.xsd file. I'm trying to locate a reliable URI for that file I can reference, so that eclipses doesn't show issues, and so that spring can also intercept the requests and replace with the files in the jar as it sees fit.
I can drill into drools-spring-5.6.0.Final.jar in eclipse and see the xsd files in org.drools.container.spring. I also can see the xsd file here: http://grepcode.com/file_/repository.jboss.org/nexus/content/repositories/releases/org.drools/drools-spring/5.6.0.Final/org/drools/container/spring/drools-spring.xsd/?v=source
Going to drools.org and following their link to github and follow the rename of their group shown in the README file to https://github.com/kiegroup. I've searched this group for the xsd file(s) but have had no luck. e.g. https://github.com/kiegroup/droolsjbpm-integration/find/5.6.0.Final and https://github.com/kiegroup/drools/find/5.6.0.Final
This makes me think that the xsd files
are generated? Can someone confirm this and if so, is there a reliable URI that I can reference for this?
For some reason, the Drools' team doesn't maintain a hosted version of this schema.
Here you have an old post from Mark Proctor explaining it.
As far as I understand, they policy is still the same: do not host any .xsd file.
Hope it helps,
The drools-spring.xsd file location on drools website will give you a 404 error. You can have below two approaches which i could find while searching on the net.
One : Host the file on your local machine
Two : Place the .xsd file in the same directory as the location of the xml file referencing it.
Please refer to the below information . This will give a better understanding of the two methods mentioned above.

Laravel + Angular2-seed integration

I am trying to integrate angular-seed into an empty laravel application.
It seems that, by default, angular-seed looks for node_modules in the root level.
I have tried modifying some parameters in the config files, but there is always something that ends up breaking.
Does anybody have experience solving this?
Thank you
Here is a repo for a with angular2 + laravel, you should be able to compare files and find the right configuration
https://github.com/moff/laravel5-angular2

How to name api routing on a webhost sub folder

I have always thought the api controllers where not found by physical paths. The reason I ask is I have a website example.com I created a folder example.com/testing and uploaded my project to there. When I ran it I got errors saying that none of the apiControllers could be found. So I changed /api/apiCustomers to /testing/api/apiCustomers. It then worked, well not the actual posting of any new records. It did locate and retrieve all the records from the database though. But it doesn't seem like that is what I would actually need to do? I have a domain with WinHost and the default publish folder is example.com/myApp
AM I looking at this the wrong way?
To handle request where you do not know the root path, you can use (as in ASP.NET) the ~-character like this:
~/api/apiCustomers
~ will then be replaced by the root (i.e. /api/apiCustomers for prod and /testing/api/apiCustomers for your test environment)

Resources