Skip to content

Commit

Permalink
Merge branch 'next-20041/remove-open-api-schema-call' into 'trunk'
Browse files Browse the repository at this point in the history
NEXT-20041 - remove open api schema call

See merge request shopware/6/product/platform!9452
  • Loading branch information
seggewiss committed Dec 1, 2022
2 parents d6b8df5 + 0572742 commit a20f3c6
Show file tree
Hide file tree
Showing 9 changed files with 137 additions and 412 deletions.
10 changes: 10 additions & 0 deletions changelog/_unreleased/2022-11-28-remove-open-api-schema-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Remove Open-API schema call
issue: NEXT-20041
author: Jannis Leifeld
author_email: j.leifeld@shopware.com
author_github: Jannis Leifeld
---
# Administration
* Removed the Shopware Entity Factory which was accessible via `Shopware.Entity`
* Changed the behavior of the CMS service to use the EntityDefinition instead of the Open-API schema

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import initComponents from 'src/app/init/component.init';
import initSvgIcons from 'src/app/init/svg-icons.init';
import initShortcut from 'src/app/init/shortcut.init';
import initFilterFactory from 'src/app/init/filter-factory.init';
import initEntity from 'src/app/init/entity.init';
import initializeNotifications from 'src/app/init/notification.init';
import initializeContext from 'src/app/init/context.init';
import initializeWindow from 'src/app/init/window.init';
Expand Down Expand Up @@ -47,7 +46,6 @@ export default {
httpClient: initHttpClient,
componentHelper: initComponentHelper,
filterFactory: initFilterFactory,
entity: initEntity,
notification: initializeNotifications,
context: initializeContext,
window: initializeWindow,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const {
Module,
Component,
Template,
Entity,
Mixin,
Filter,
Directive,
Expand All @@ -18,7 +17,7 @@ const {
Helper
} = Shopware;

describe('core/common.js', () => {
describe('core/shopware', () => {
it('should contain the necessary methods for the module factory', async () => {
expect(Module).toHaveProperty('register');
});
Expand All @@ -38,28 +37,6 @@ describe('core/common.js', () => {
expect(Template).toHaveProperty('getRenderedTemplate');
});

it('should contain the necessary methods for the entity factory', async () => {
expect(Entity).toHaveProperty('addDefinition');
expect(Entity).toHaveProperty('getDefinition');
expect(Entity).toHaveProperty('getDefinitionRegistry');
expect(Entity).toHaveProperty('getRawEntityObject');
expect(Entity).toHaveProperty('getPropertyBlacklist');
expect(Entity).toHaveProperty('getRequiredProperties');
expect(Entity).toHaveProperty('getAssociatedProperties');
expect(Entity).toHaveProperty('getTranslatableProperties');
});

it('should contain the necessary methods for the entity factory', async () => {
expect(Entity).toHaveProperty('addDefinition');
expect(Entity).toHaveProperty('getDefinition');
expect(Entity).toHaveProperty('getDefinitionRegistry');
expect(Entity).toHaveProperty('getRawEntityObject');
expect(Entity).toHaveProperty('getPropertyBlacklist');
expect(Entity).toHaveProperty('getRequiredProperties');
expect(Entity).toHaveProperty('getAssociatedProperties');
expect(Entity).toHaveProperty('getTranslatableProperties');
});

it('should contain the necessary methods for the mixin factory', async () => {
expect(Mixin).toHaveProperty('register');
expect(Mixin).toHaveProperty('getByName');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Bottle from 'bottlejs';
import ModuleFactory from 'src/core/factory/module.factory';
import AsyncComponentFactory from 'src/core/factory/async-component.factory';
import TemplateFactory from 'src/core/factory/template.factory';
import EntityFactory from 'src/core/factory/entity.factory';
import StateFactory from 'src/core/factory/state.factory';
import ServiceFactory from 'src/core/factory/service.factory';
import ClassesFactory from 'src/core/factory/classes-factory';
Expand Down Expand Up @@ -64,9 +63,6 @@ application
.addFactory('module', () => {
return ModuleFactory;
})
.addFactory('entity', () => {
return EntityFactory;
})
.addFactory('state', () => {
return StateFactory;
})
Expand Down Expand Up @@ -133,18 +129,6 @@ class ShopwareClass {
getRenderedTemplate: TemplateFactory.getRenderedTemplate,
};

public Entity = {
addDefinition: EntityFactory.addEntityDefinition,
getDefinition: EntityFactory.getEntityDefinition,
getDefinitionRegistry: EntityFactory.getDefinitionRegistry,
getRawEntityObject: EntityFactory.getRawEntityObject,
// eslint-disable-next-line inclusive-language/use-inclusive-words
getPropertyBlacklist: EntityFactory.getPropertyBlacklist,
getRequiredProperties: EntityFactory.getRequiredProperties,
getAssociatedProperties: EntityFactory.getAssociatedProperties,
getTranslatableProperties: EntityFactory.getTranslatableProperties,
};

public State = StateFactory();

public Mixin = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ const missingTests = [
'component.init.js',
'context.init.ts',
'directive.init.js',
'entity.init.js',
'extension-component-sections.init.ts',
'extension-data-handling.init.ts',
'filter-factory.init.js',
Expand Down Expand Up @@ -311,7 +310,6 @@ const missingTests = [
'classes-factory.js',
'directive.factory.js',
'entity-definition.factory.js',
'entity.factory.js',
'filter.factory.ts',
'locale.factory.ts',
'mixin.factory.ts',
Expand Down
Loading

0 comments on commit a20f3c6

Please sign in to comment.