1015 search results for API Platform

... api_platform_bug`), install API platform and see if you can reproduce the bug with the *minimum* amount of code possible. Then, push that to GitHub on its own repo and link to it from the issue. I can say from experience ...
weaverryan
weaverryan
Read Full Comment
... include a Bearer Token, the response recieved is the login page code. What I would like to do is return a JsonResponse. Any ideas about how to do this? I am not getting it to work. I don't think it matters. But, just in case, I am doing this in a new project using API Platform. Thanks in advance!
... API Platform version: 3.1.14 Thanks a lot, all help is really appreciated. EDIT: sorry, I seem to struggle with the code block, I can't manage to put it in one codeblock ...
On the latest version of API Platform (3.2) it looks like Virtual Properties don't seem to work correctly when creating embedded objects. I've added group "user:write" to the "name" and "value" properties in ...
... it should understand this intention. > It works but is it not using the Event system? This IS GraphQL-friendly, so keep it. By "don't use the event system", API Platform means don't try adding event listeners to ...
weaverryan
weaverryan
Read Full Comment
... //github.com/api-platform/core/blob/60240f506802883a8f02b7015b9d676f8a2897d5/src/Serializer/AbstractItemNormalizer.php - because this is where that `api_empty_resource_as_iri` is read and used to return the IRI. But if ...
weaverryan
weaverryan
Read Full Comment
... metadata" and another part would already have the values of a more current "json metadata". If there was a way to "hack" swagger documentation to inform the user about this details would be nice. And it would be perfect if api-platform created the calls to POST already showing the fields inside json!
... help Symfony and API Platform by doing it myself if needed, but I still have lot to learn before contributing to the community :) I think at least that this behaviour should be mentioned here: https://api-platform.com/docs ...
Override extension configuration via compiler pass; I'm trying to override an existant api platform configuration `api_platform.mapping.paths` via a some kinda of custom Compiler Pass *The goal is to merge my new ...
... weekend. Do you have any ideas? Can you reproduce this problem? Thank you very much in advance. Annemieke Update I've created a new project with symfony 5. Only added api platform to it, And two entities, namely user and cheeselisting. No security yet, nothing. And it still does not work. I'm close to giving up.
... "core" calls that resolver: https://github.com/api-platform/core/blob/d6f2603fe80236b1c7bac2a92b49b337c8cc6973/src/GraphQl/Resolver/Factory/ItemMutationResolverFactory.php#L112-L117 I wouldn't normally want this type of ...
weaverryan
weaverryan
Read Full Comment
... as $item) { $this->tags->add($item); } return $this->tags; } ``` As I use serializer to return an API response, using API Platform, there was an issue returning``` return new ArrayCollection ...
... is going on here... but it's still "fuzzy" to me - I need some more details. Without any special setup, your object should be validated exactly the same whether it's submitted through a form or through API Platform. The ...
weaverryan
weaverryan
Read Full Comment
... (just as you've done) to change the `window.location`. Here's some info about returning this response - https://symfonycasts.com/screencast/api-platform-security/login-response#codeblock-d462cd0049 - I also think it ...
weaverryan
weaverryan
Read Full Comment
... could probably easily use this to solve your issue. But, how to hook into API Platform so you can add this option? The answer (I believe) is via a context builder - https://api-platform.com/docs/core/serialization ...
weaverryan
weaverryan
Read Full Comment
68 lines | webpack.config.js
var Encore = require('@symfony/webpack-encore');
Encore
// directory where compiled assets will be stored
.setOutputPath('public/build/')
// public path used by the web server to access the output path
.setPublicPath('/build')
// only needed for CDN's or sub-directory deploy
//.setManifestKeyPrefix('build/')
/*
* ENTRY CONFIG
*
* Add 1 entry for each "page" of your app
* (including one that's included on every page - e.g. "app")
*
* Each entry will result in one JavaScript file (e.g. app.js)
* and one CSS file (e.g. app.css) if you JavaScript imports CSS.
*/
.addEntry('app', './assets/js/app.js')
//.addEntry('page1', './assets/js/page1.js')
//.addEntry('page2', './assets/js/page2.js')
// When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
.splitEntryChunks()
// will require an extra script tag for runtime.js
// but, you probably want this, unless you're building a single-page app
.enableSingleRuntimeChunk()
/*
* FEATURE CONFIG
*
* Enable & configure other features below. For a full
* list of features, see:
* https://symfony.com/doc/current/frontend.html#adding-more-features
*/
.cleanupOutputBeforeBuild()
.enableBuildNotifications()
.enableSourceMaps(!Encore.isProduction())
// enables hashed filenames (e.g. app.abc123.css)
.enableVersioning(Encore.isProduction())
// enables @babel/preset-env polyfills
.configureBabel(() => {}, {
useBuiltIns: 'usage',
corejs: 3
})
// enables Sass/SCSS support
//.enableSassLoader()
// uncomment if you use TypeScript
//.enableTypeScriptLoader()
// uncomment to get integrity="..." attributes on your script & link tags
// requires WebpackEncoreBundle 1.4 or higher
//.enableIntegrityHashes()
// uncomment if you're having problems with a jQuery plugin
//.autoProvidejQuery()
// uncomment if you use API Platform Admin (composer req api-admin)
//.enableReactPreset()
//.addEntry('admin', './assets/js/admin.js')
;
module.exports = Encore.getWebpackConfig();
See Code Block in Script
... The data provider is only called to "fetch" the "top-level" resource. In this case, the "Service" object. Once that has been fetched, even if you exposed a "mediaObject" field, API Platform simply calls `$service ...
weaverryan
weaverryan
Read Full Comment
Hello @weaverryan ! Thank you for answering all my questions, it's great! So, for this problem, Since then, I have advanced (and finished) in API Platform training, suddenly the code is not the same. But off the top ...
... topic in general doesn't really relate to API Platform - it's more of a Symfony security setup. This bundle - https://github.com/dunglas/DunglasAngularCsrfBundle - which doesn't work for Symfony 5 (as the author is mostly ...
weaverryan
weaverryan
Read Full Comment
... ": "Paginator", "class": "Doctrine\\ORM\\Tools\\Pagination\\Paginator", "type": "->", "function": "getIterator", "file": "C:\\CODES\\FORMATION\\TutoModuleComment\\vendor\\api-platform\\core\\src ...