-
Couldn't load subscription status.
- Fork 0
Storebindings #19
base: master
Are you sure you want to change the base?
Storebindings #19
Conversation
| "@api-modeling/api-modeling-metadata": "^0.1.3", | ||
| "@api-modeling/amf-client-js": "^4.1.12", | ||
| "@api-modeling/api-modeling-metadata": "^0.1.4", | ||
| "@api-modeling/metadata-store": "^0.1.17", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Model-bindings cannot depend on the metadata-store
| const SUPPORTED_SYNTAXES = [ApiParser.YAML, ApiParser.JSONLD, ApiParser.JSON] | ||
|
|
||
| export class APIContractBindingsPlugin extends BindingsPlugin { | ||
| export class APIContractBindingsPlugin /* extends BindingsPlugin */{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to extend BindignsPlugin
| export interface Resource { | ||
| url: string | ||
| text: string | ||
| text?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can you get or generate a resource without data?
| * Common interface for all bindings plugins | ||
| */ | ||
| export abstract class BindingsPlugin { | ||
| constructor(){} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
src/main/bindings/BindingsPlugin.ts
Outdated
| let graph = namedNode(regime) | ||
| let bindingDeclarationSource = namedNode(bindingDeclSrc) | ||
| let stupid = `file://${process.cwd()}/node_modules/@api-modeling/api-modeling-metadata/model/bindings/schema/modelBindingsDialect.yaml#/declarations/Binding` | ||
| store.addQuad(bindNode, rdfType, bindName,graph) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we adding this to the store? If you generate bindings, add them to a bindings model
| return []; | ||
| } | ||
| } | ||
| export function findPathOld(store: n3.Store, subject: n3.Quad_Object, path: n3.Quad_Object[]): n3.Quad_Object|null { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still in use? Remove if not
src/main/index.ts
Outdated
| @@ -0,0 +1,262 @@ | |||
| import {DialectWrapper, ModularityDialect, Module, Entity, Attribute, Association, IntegerScalar, StringScalar, DataModel, DataModelDialect, ModelBindingsDialect, BindingsModel, Binding, BindingArrayValue} from "@api-modeling/api-modeling-metadata"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this file here?
| @@ -1,95 +0,0 @@ | |||
| import { describe } from 'mocha' | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this removed?
…atenating entity group name and entity name
Updates to support full import and export. Works for CIM (almost). Added PluginController class to choose between multiple plugins. Should be easily called from the UI. There is still a minor issue with cim version.