Coder Social home page Coder Social logo

Comments (12)

RicoSuter avatar RicoSuter commented on August 11, 2024

It would be better if its static settings so that it can also be used in the cmd line tool or UI... Or give both options.

from njsonschema.

RicoSuter avatar RicoSuter commented on August 11, 2024

Btw. whats currently the name of this property?

from njsonschema.

lheiskan avatar lheiskan commented on August 11, 2024

Static alternatives should become easy to implement if the library has a mechanism like this in place, so perhaps supporting both would make sense?

Not sure which property you are referring to?

from njsonschema.

lheiskan avatar lheiskan commented on August 11, 2024

i.e. the above has a schema with a property 'foo_bar-b64', generator settings has been extended with two additional properties: PropertyName(Transform)Fun and TypeNameTransformFun.

And there's an implementation for a transform lamba that produces more c-sharpy names i.e. foo_bar-b64 ==> FooBar_b64.

It might make sense to use a default transformation in the lib (which would generate names that look like the current names), and then allow overriding this with the settings properties.

from njsonschema.

RicoSuter avatar RicoSuter commented on August 11, 2024

Good idea...

from njsonschema.

RicoSuter avatar RicoSuter commented on August 11, 2024

Ill check how to correctly implement this...

from njsonschema.

lheiskan avatar lheiskan commented on August 11, 2024

I've hacked something in for generating CS, if you are interested i can clean things up a bit and put it in a branch - i.e. if it helps, let me know.

from njsonschema.

RicoSuter avatar RicoSuter commented on August 11, 2024

You can create a PR so that I can check it, but we have to be very careful to not break anything and keep the code quality high... I probably will implement this myself because i know all the dependencies and strange specialities of JSON Schema and this lib.

from njsonschema.

RicoSuter avatar RicoSuter commented on August 11, 2024

The lib is also used in http://NSwag.org and all changes have to be aligned with that (+ options added to cmd line tools, desktop UI, etc). There's always more effort involved :-)

from njsonschema.

RicoSuter avatar RicoSuter commented on August 11, 2024

IPropertyNameGenerator: 908c364

from njsonschema.

RicoSuter avatar RicoSuter commented on August 11, 2024

ITypeNameGenerator: d95ca77

from njsonschema.

RicoSuter avatar RicoSuter commented on August 11, 2024

These features are currently not tested (ie everything works as expected when they are null). It would be very nice if you can add some unit tests to test the PropertyNameGenerator and TypeNameGenerator!

from njsonschema.

Related Issues (20)

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.