openshift-online / ocm-api-metamodel Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
I'm trying to port over one of our apps, and I figured I'd start small. So, I created a root_resource.model
, applications_resource.model
and an application_type.model
file. They're mostly a copy pasta of some of the other models I saw in the ocm-api-model project.
I've got a local clone of the ocm-sdk-go project, and I'm running the following command on my Mac:
make model_version=HEAD model_url=/Users/dberger/Dev/ocm-api-model generate
This results in the following:
E: Resource 'Application' isn't completely defined
E: Can't read model: there was 1 error
I would like a more helpful error message here, something that explains to me exactly what I'm missing, because it's not immediately obvious to me.
BTW, current fork is here if you have any insights:
There appears to be issues generating the ocm-sdk from ocm-api-model using the latest metamodel code:
I built the metamodel using make binary, then went to the ocm-api-model repository and ran:
ocm-api-metamodel/metamodel generate go --model=model --base=github.com/openshift-online/ocm-sdk-go --output=./sdk/
With the latest metamodel code, the above command fails with the following error:
E: Type 'string' isn't completely defined
E: Can't read model: there was 1 error
If I move the metamodel code to the version specified in the Makefile of ocm-api-model, v0.0.45, then the model is successfully generated.
Is anyone familiar with what this error means?
I made a mistake and put an Applications
locator inside an applications_resource.model
file. Apparently that caused some kind of recursion/stack overflow when I went to generate the thing:
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc02b4803d8 stack=[0xc02b480000, 0xc04b480000]
fatal error: stack overflow
runtime stack:
runtime.throw(0x145ab32, 0xe)
/usr/local/opt/go/libexec/src/runtime/panic.go:1117 +0x72
runtime.newstack()
/usr/local/opt/go/libexec/src/runtime/stack.go:1069 +0x7ed
runtime.morestack()
/usr/local/opt/go/libexec/src/runtime/asm_amd64.s:458 +0x8f
I would like to see it dynamically check for recursive calls, warn the user and/or just bail out.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.