Describe the bug
I wrote a custom AsyncApiCustomizer that updates the examples of some schema objects.
Dependencies and versions used
Code example
@Component
public class CustomAsyncApiCustomizer implements AsyncApiCustomizer {
@Override
public void customize(AsyncAPI asyncAPI) {
Map<String, SchemaObject> schemas = asyncAPI.getComponents().getSchemas();
flattenSchema(schemas, Ipv4Address.class, "10.0.4.5");
}
private void flattenSchema(Map<String, SchemaObject> schemas, Class<?> schemaClass, String example) {
SchemaObject schemaObject = schemas.get(schemaClass.getName());
schemaObject.setType("string");
schemaObject.setProperties(null);
schemaObject.setExamples(List.of(example));
}
}
But I have other schema's, e.g. Ipv4AddressConfiguration, that have Ipv4Address as a property. In the generated Springwolf UI, I can see that the example of Ipv4Address is changed but not the example of Ipv4AddressConfiguration.
{
"ipv4Address": {
"bytes": "1sdasdasd="
},
"subnetMask": 8
}
How can I make sure that the example of the Ipv4AddressConfiguration is regenerated AFTER updating the "leaf" schema examples? Is there a way to regenerate ALL examples from the AsyncApiCustomizer?
Stack trace and error logs
No stack traces
Describe the bug
I wrote a custom
AsyncApiCustomizerthat updates the examples of some schema objects.Dependencies and versions used
springwolf-uiversion1.12.0springwolf-stompversion1.12.0Code example
But I have other schema's, e.g.
Ipv4AddressConfiguration, that haveIpv4Addressas a property. In the generated Springwolf UI, I can see that the example ofIpv4Addressis changed but not the example ofIpv4AddressConfiguration.{ "ipv4Address": { "bytes": "1sdasdasd=" }, "subnetMask": 8 }How can I make sure that the example of the
Ipv4AddressConfigurationis regenerated AFTER updating the "leaf" schema examples? Is there a way to regenerate ALL examples from theAsyncApiCustomizer?Stack trace and error logs
No stack traces