Comments (6)
from cakephp-swagger-bake.
I believe the reason is, even if with hotReload set to off, a user may still run this code via the CLI. In fact, running via the CLI (e.g. bin/cake swagger bake
) is the recommended way to deploy to production.
I see your PR has a condition for SAPI CLI, but I am highly worried about introducing this change. Why? I don't know, other than I have a hunch this will cause problems for other users.
from cakephp-swagger-bake.
This is a valid issue and I will explore it more. However, I find it unlikely I will accept the PR for the reasons previously stated. For your specific case (I recall from slack you have something like 160+ routes), I would advise simply replacing SwaggerController with your own. The logic in there is very light:
https://github.com/cnizzardini/cakephp-swagger-bake/blob/2.x/src/Controller/SwaggerController.php
You may extract out the logic from the injected service (https://github.com/cnizzardini/cakephp-swagger-bake/blob/2.x/src/Lib/Service/OpenApiControllerService.php) and place it directly in your controller or define your own service and it inject it per: https://book.cakephp.org/4/en/development/dependency-injection.html
Is this a reasonable workaround to the performance issues your application is experiencing?
If you are keen on getting that PR passed, I will post a potential solution I might be okay with accepting in the PR.
from cakephp-swagger-bake.
I'm also curious if you identified the actual source of the performance issue. Knowing the specific cause, that is, the actual line or lines of code causing the performance issues is necessary for a resolution.
from cakephp-swagger-bake.
Also have you tried this: #454
from cakephp-swagger-bake.
Related Issues (20)
- Run v3.0.0 branch against latest 5.0.0-x
- PHP8.2 - deprecation warning when setting dynamic properties on OpenApi\Schema HOT 4
- Request DTO type Double HOT 19
- SwaggerBake config namespace is null in Configuration constructor HOT 4
- Support for MySQL json field type HOT 7
- OpenApiResponse annotation doesn't work properly with schemaType: 'array' and ref. HOT 4
- OpenApiSchemaProperty(name: 'propert_name', type: 'array') not working
- Logic of Configuration class HOT 11
- Feature Query: is it possible to hide model properties? HOT 4
- Backport fix from 5.x branch
- Too few arguments to function Cake\View\Exception\MissingTemplateException::__construct(), 0 passed HOT 4
- Throw tags taking precedence over OpenApiResponse attribute
- collection generation HOT 3
- Undefined array key "securitySchemes" in Cakaphp 4.15 version HOT 2
- Undefined array key "securitySchemes" HOT 10
- Cannot make controller working HOT 3
- Prevent loading associations in ApiResponse(associations: $var) HOT 10
- Up-port 2.5.9 to 3.0.1
- [InvalidArgumentException] Invalid yml: `/config/swagger.yml
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cakephp-swagger-bake.