Error building class name
See original GitHub issueParsing this schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON Schema for NVD Common Product Enumeration (CPE) Feed version 0.1 Beta",
"id": "https://scap.nist.gov/schema/nvd/feed/1.0/nvd_cve_feed_json_1.0_beta.schema",
"description": "NVD data feed of CPE",
...
}
raises black.InvalidInput: Cannot parse: 10:6: class 1 Beta(BaseModel):
The problem was settled by changing the schema’s title to Cpe
.
Version:
- OS: Windows
- Python version:
3.7.7
- datamodel-code-generator version:
0.6.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
javac error: Class names are only accepted if annotation ...
The error "Class names are only accepted if annotation processing is explicitly requested" can be caused by one or more of the following:....
Read more >[java] Some classes are causing Malformed class name errors
Issue appears specific to 1 project and only specific files within that project. Other project runs completely fine with no issues. BUILD FAILED ......
Read more >errors when using class names locators Getting compound ...
I have written a method which will count the no of elements in <divs> and will return the number. Below is the error...
Read more >"The type or namespace name 'ClassName' does not exist ...
FIX: "The type or namespace name 'ClassName' does not exist" error message when you try to build a Visual C# Windows Form solution...
Read more >The Basics - Manual - PHP
Basic class definitions begin with the keyword class , followed by a class name, followed by a pair of curly braces which enclose...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great. Thank you!
Moving forward to avoid dead spots can be a great improvement to generate models also dynamically. I’ll stay tuned.
@nuno-andre I have released a new version as
0.6.4
This release has two changes.
--class-name
option sets the name of the root model.--class-name
is not set.I considered your approach that is below.
id
anddescription
as a model name.get_valid_name
I feel good about the approach. But, this is a breaking change. I don’t choose the breaking change in this release.
However, I want to implement these next major(1.x) or miner (0.7.x) version.
Thank you