Add JSON-Template-Automated-AAS-Creation Feature to BaSyx Editor Plugin #491
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request: JSON-Template-Automated-AAS-Creation
Description of Changes
This pull request introduces the
TemplateAASPlugin
to the BaSyx Editor Plugin, enabling dynamic JSON template loading and template-based Asset Administration Shell (AAS) creation within the BaSyx-UI. Key changes include:TemplateAASPlugin
inUserPlugins/TemplateAASPlugin/
with:import.meta.glob
to load JSON templates (carbon-footprint-template.json
,contact-information-template.json
,technical-data-template.json
) fromtemplates/
.TemplateBasedAASCreator.vue
with a stepper-based dialog for AAS creation, supporting multi-language inputs (ID Short, Display Name, Description).TemplateStorageService.ts
,TemplateValidatorService.ts
, andTemplateBasedAASCreator.ts
for template management, schema validation, and AAS creation via BaSyx backend API.template-schemas.json
and handles user input errors.AASList
for the template-dialog initialization.Related Issue
Resolves #TINF23F-123
BaSyx Configuration for Testing
To test the changes, configure the BaSyx backend as follows:
POST /aas
andGET /aas/:id/endpoint
endpoints).npm install
in the project root.npm run build
to generatebasyx_editor_plugin.js
.templates/
directory containscarbon-footprint-template.json
,contact-information-template.json
,technical-data-template.json
, andtemplate-schemas.json
.AAS Files Used for Testing
carbon-footprint-template.json
: Tests AAS creation with environmental submodel data.contact-information-template.json
: Tests AAS creation with contact-related submodel data.technical-data-template.json
: Tests AAS creation with technical specifications.product-quality-testing-template.json
: Tests AAS creation with quality testing specifications.UserPlugins/TemplateAASPlugin/templates/
.Additional Information
Fixed template validation issues by adding missing fields (e.g.,
aasVersion
,version
) to JSON files.TemplateBasedAASCreator.ts
.import.meta.glob
for scalability and hot-reloading support.Testing Confirmation: The changes have been thoroughly tested to ensure templates load correctly, the UI dialog functions as expected, and AAS creation succeeds with valid inputs.