Comments (3)
@michaelcfanning This is by design, although you could argue that the design isn't as easy to use as it should be. To get this to work, you need to file any hints that affect the renamed class under the new class name. BaseTypeHint
isn't the only hint that's affected. To fix this, your CodeGenHints.json
needs to look like this:
"exception": [
{
"kind": "ClassNameHint",
"arguments": {
"className": "ExceptionData"
}
}
],
"exceptionData": [
{
"kind": "BaseTypeHint",
"arguments": {
"baseTypeNames": [
"PropertyBagHolder"
]
}
}
],
Another nit in the design is that the renamed class has to appear in camelCase in the hints file. In the example above, note that the dictionary key is exceptionData
, even though the renamed class is ExceptionData
.
I added a unit test to demonstrate this. I'll close this issue once the PR is merged.
from jschema.
makes sense, i'll fix this in our codegen file. thanks for taking a look.
from jschema.
PR is merged; issue closed.
from jschema.
Related Issues (20)
- Add JsonProperty(DefaultValueHandling.Include) for required primitives
- Provide options for marking types as sealed, members as virtual HOT 1
- Need a mechanism to allow object properties for type nullable<int>
- Allow generated Init methods to be protected
- Support 64-bit integer properties via codegen hint
- Unions with Relative Uris don't parse correctly HOT 1
- Implement value equality on JsonPointer
- Don't report validation error locations or artifact locations as absolute URIs.
- Evaluating JPointer can report incorrect start line HOT 2
- Json.Schema.Validation, wrong result
- Support partial classes HOT 1
- Support of generate field order attribute
- Auto-generate IComparer implementation code for all entities HOT 1
- check possibility to merge `JSON1006.ValueTooLarge` and `JSON1008.ValueTooSmall` into one `ValueOutOfRange` rule
- See if jschema can change to support Big Integer instead of max 64 bit integer HOT 1
- This repo is missing important files
- Support UUIDs HOT 1
- Evaluate and add option `--generate-json-number-as` HOT 1
- Examine `Equals` methods and add tests
- Improvement: remove unnecessary initialization of property default value in ToDotNet
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jschema.