Skip to content

Conversation

@petersg83
Copy link
Contributor

fix #3965

Signed-off-by: Pierre Noël <pierre.noel@strapi.io>
@codecov
Copy link

codecov bot commented Mar 24, 2020

Codecov Report

Merging #5586 into master will increase coverage by 0.00%.
The diff coverage is 17.85%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5586   +/-   ##
=======================================
  Coverage   17.50%   17.51%           
=======================================
  Files         700      700           
  Lines       10332    10322   -10     
  Branches     1688     1686    -2     
=======================================
- Hits         1809     1808    -1     
+ Misses       7090     7083    -7     
+ Partials     1433     1431    -2     
Flag Coverage Δ
#front 12.88% <ø> (ø)
#unit 37.40% <17.85%> (+0.13%) ⬆️
Impacted Files Coverage Δ
packages/strapi-generate/lib/generate.js 15.68% <0.00%> (ø)
...er/services/schema-builder/content-type-builder.js 10.98% <30.00%> (+0.11%) ⬆️
...ugin-content-type-builder/services/ContentTypes.js 21.12% <100.00%> (ø)
...ilder/services/schema-builder/component-builder.js 13.72% <100.00%> (ø)
packages/strapi-utils/lib/index.js 100.00% <100.00%> (ø)
packages/strapi-utils/lib/stringFormatting.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 562b030...057ec58. Read the comment docs.

Signed-off-by: Pierre Noël <pierre.noel@strapi.io>
@alexandrebodin alexandrebodin added issue: bug Issue reporting a bug source: core:strapi Source is core/strapi package labels Mar 25, 2020
@alexandrebodin alexandrebodin added this to the 3.0.0-beta.19.4 milestone Mar 25, 2020
Copy link
Member

@alexandrebodin alexandrebodin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@alexandrebodin alexandrebodin merged commit a63c692 into master Mar 25, 2020
@alexandrebodin alexandrebodin deleted the fix/#3965/brokenScaffoldingApiOnPlugin branch March 25, 2020 08:31
@derrickmehaffy
Copy link
Member

This pull request has been mentioned on Strapi Community. There might be relevant details there:

https://forum.strapi.io/t/supporting-modular-programming-via-plugin-system/1090/9

name: scope.name,
});
let routes = [];
if (!scope.args.plugin) {
Copy link
Contributor

@sunnysonx sunnysonx Nov 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @alexandrebodin & @petersg83, What's the reason for disabling the API routes generation inside plugins? Is there any known issue with it? I've deleted that if (!scope.args.plugin) { locally and it seems to generate/merge existing routes for plugins ok.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the plugin models don't get auto generated controllers those default routes point to nothing. There was no reason to generate them :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, it also brokes the functionality of the strapi generate:api order --plugin shop command, which should create a new API inside the plugin, it doesn't generate the routes for it automatically.

@derrickmehaffy
Copy link
Member

This pull request has been mentioned on Strapi Community. There might be relevant details there:

https://forum.strapi.io/t/supporting-modular-programming-via-plugin-system/1090/11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

issue: bug Issue reporting a bug source: core:strapi Source is core/strapi package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scaffolding APIs on plugin seems broken

5 participants