You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ParseOptions parseOptions = new ParseOptions();
parseOptions.setResolve(true); // implicit
parseOptions.setResolveFully(true);
String openApiSpec = schemaReference.getUrl(); // Replace with the actual path to your OpenAPI file
SwaggerParseResult result = new OpenAPIV3Parser().readLocation(openApiSpec, null, null);
if (result.getMessages().isEmpty()) {
OpenAPI openAPI = result.getOpenAPI();
// Extract the schema from the OpenAPI specification
ObjectMapper mapper = new ObjectMapper();
JsonNode schemaNode = mapper.convertValue(
openAPI.getComponents().getSchemas().get("NotifyNewAlarm"), JsonNode.class);
// Convert the schemaNode to JSONObject
JSONObject jsonSchema = new JSONObject(new JSONTokener(schemaNode.toString()));
As you can see the $schema is null but the value of $schema should be string.
Any ideas what I am lacking?
//mike
The text was updated successfully, but these errors were encountered:
Hi,
I am trying this code and parsing https://forge.3gpp.org/rep/sa5/MnS/-/blob/Integration_Rel16_SA5_155_YAML/OpenAPI/TS28532_FaultMnS.yaml
As you can see the $schema is null but the value of $schema should be string.
Any ideas what I am lacking?
//mike
The text was updated successfully, but these errors were encountered: