Giter Club home page Giter Club logo

concerto-dotnet's People

Contributors

dependabot[bot] avatar jamieshorten avatar mttrbrts avatar ragi-dayananda avatar sstone1 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

concerto-dotnet's Issues

Add normalizeIdentifier method in C# lib

Feature Request ๐Ÿ›๏ธ

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#?

https://github.com/accordproject/concerto/blob/51dc8eb141ebb142b6964a25830fdeb21e147909/packages/concerto-util/lib/identifiers.js#L28

Use Case

We want to use the normalizeIdentifier method in C# to normalize the name of the concept.

Possible Solution

Context

Detailed Description

Unit tests failing

Bug Report ๐Ÿ›

Tests are failing because the tests expect a version to be present in the class names in the generated meta model.

Expected Behavior

Tests should pass.

Current Behavior

Round trip tests fail

Possible Solution

  1. Regenerate the metamodel in non strict mode.
  2. Rework tests.

Port Validation from JavaScript Implementation

Feature Request ๐Ÿ›๏ธ

To mirror the functional API for Concerto, we need to implement validation of a JSON object against a model definition.

Use Case

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.

Possible Solution

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.

Context

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.

Detailed Description

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

Extract the required namespaces needed to validate an instance from that instance.

Feature Request Extract the required namespaces needed to validate an instance from that instance.

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.

Use Case

Obtaining namespace names for retrieval to use for later validation of the instance

Possible Solution

Traverse the object graph of the instance and add any newly encountered namespaces to a list to be returned.

Feature Request: Configurability for validation

Feature Request: Configurability for validation

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.

Use Case

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.

Possible Solution

pass an options object into the validation functions

Support Map types

Discussion ๐Ÿ—ฃ

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

Publish documentation

We should automatically generate documentation from our C# code and publish it somewhere.

Build the MetaModel classes from source

Feature Request ๐Ÿ›๏ธ

The MetaModel classes are currently built by running the Concerto CLI manually. This should instead be baked into the GitHub Actions release script.

Use Case

Possible Solution

Context

Detailed Description

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.