Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.

Conversation

@mattdfuchs
Copy link
Contributor

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.

"@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",
Copy link
Contributor

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 */{
Copy link
Contributor

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
Copy link
Contributor

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(){}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why?

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)
Copy link
Contributor

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 {
Copy link
Contributor

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

@@ -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";
Copy link
Contributor

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'
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this removed?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants