-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
@@ -13,7 +13,7 @@ import {ApiGenerator} from "./utils/apiGenerator"; | |||
const SUPPORTED_FORMATS = [ApiParser.RAML1, ApiParser.OAS3 + ".0", ApiParser.OAS2, ApiParser.AMF_GRAPH, ApiParser.JSON_SCHEMA]; | |||
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
|
||
/** | ||
* Some external resource plugins will work with. Just a URL identifying the resource and the text of the resource. | ||
*/ | ||
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.