accordproject / concerto-dotnet Goto Github PK
View Code? Open in Web Editor NEWA .NET implementation of the Concerto Schema Language
License: Apache License 2.0
A .NET implementation of the Concerto Schema Language
License: Apache License 2.0
The normalizeIdentifier function is used to normalize the name of the concept. It's been provided in js lib but not in C# lib. Could you please add the function in C#?
We want to use the normalizeIdentifier method in C# to normalize the name of the concept.
Tests are failing because the tests expect a version to be present in the class names in the generated meta model.
Tests should pass.
Round trip tests fail
To mirror the functional API for Concerto, we need to implement validation of a JSON object against a model definition.
Validation is a key operation of a schema language, and is used to determine whether data is valid with respect to the model and the language specification.
The existing (empty) AccordProject.Concerto
namespace should have a public class added that contains a validate
operation with the following signature:
public void validate(String jsonObject, ObjectValidatorOptions options) {
//...
}
Note that this is not a binary operation, i.e. there is no true
/false
response depending on the outcome of validation. Instead, a validation of a valid object will return successfully and validation of an invalid object will throw an exception that contains details of why the validation failed.
The reference implementation for this is in the JS version of Concerto.
It is critical that implementations of Concerto for different runtimes have the same semantics and very close signatures. Extensions to the language should be avoided until parity is achieved with the JS implementation. It is expected that the JS implementation will continue to be the reference implementation for some time.
A proper implementation of validation will also require porting of the ModelManager and associated introspection Classes (see #4).
Existing unit tests, which should be ported
Dates are specified according to the ISO 8601 standard. We adopt the DayJS library which supports the following formats This spec must be respected in the .NET port. All of the following are valid date formats in Concerto.
YYYY-MM-DDTHH:MM:SS.000+hh:mm
YYYY-MM-DDTHH:MM:SS.000+hhmm
YYYY-MM-DDTHH:MM:SS.000Z
YYYY-MM-DDTHH:MM:SS.000
YYYY-MM-DDTHH:MM:SS
YYYY-MM-DDTHH:MM:SSZ
YYYY-MM-DD
YYYY-MM
YYYYMMDD
YYYYMMDDTHHMMSS
Regular expressions use the ECMAScript flavour, any validation of Regular Expressions in field validators should be performed in ECMAScript compatibility mode.
Error messages and console logs must not include any values from the input data, e.g. accordproject/concerto#483
In order to validate an instance the validator needs JSON ASTs for the types present in the instance. It would be useful to have a function to retrieve the unique types from the instance so we know which namespaces we need to retrieve.
Obtaining namespace names for retrieval to use for later validation of the instance
Traverse the object graph of the instance and add any newly encountered namespaces to a list to be returned.
The modelManager
class supports operating in strict mode or non strict mode, and with or without map types enabled. It should be possible to configure dotnet validation to do the same.
The dotnet validation function should be able to optionally configure the modelManager
running in node to support strict or non strict modes and the enable or disable map types.
pass an options object into the validation functions
A .NET port of the Concerto runtime should mirror the semantics and API signature of the Functional API in the JS implementation. Note that Concerto has both a functional and class-based API today. The latter is expected to be deprecated in a future release
The Concerto meta-model used to generated this library does not have the new Map types. We should regenerate the library from the new meta-model to support theses type
We should automatically generate documentation from our C# code and publish it somewhere.
The MetaModel classes are currently built by running the Concerto CLI manually. This should instead be baked into the GitHub Actions release script.
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.