Forum Discussion
Hi joejoyce. Thanks for responding. I've isolated the issue to that of using a public nested class as the response type as well as using the SwaggerGenOption c.CustomSchemaIds(x => x.FullName). This produces a schema definition in the swagger.json file containing the '+' character (Namespace.ParentClass+NestedClass). When importing the api definition in ReadyApi, I get the error message:
"attribute components.schemas.Schema name Namespace.ParentClass+NestedClass doesn't adhere to regular expression ^[a-zA-Z0-9\.\-_]+$"
If the nested class is moved outside the parent class, then the schema in the swagger.json file is generated using a '.' instead of a '+' and it works.
I have attached a sample project that demonstrates this.
joejoyce I just wanted to follow up with the question about whether or not the issue of the ReadyAPI not being able to import the schema in the generated swagger.json file when it contains the '+' character is expected behavior or not. If it is, then I will work on refactoring our code so that it generates the schema without the '+' character.
Thanks.
Related Content
- 3 years ago
Recent Discussions
- 22 days ago