I am using OpenAPI avro-schema generator to convert OpenAPI schema specification for REST API service.

The output is a collection of avsc files when I need a single avsc output or atleast a way to concat related avsc files together. From the generator Config options and source code doesnt look like this is customizable?

Is there a quick way to do so or I need to use utilities like KiteDataCore as a wrapper on top of OpenAPI avro-schema generator?

Example - I expect the following structures in a single avsc file

cat ActorInput.avsc
{
  "namespace": "model",
  "type": "record",
  "doc": "Container input to associate a contact and address with an actor.",
  "name": "ActorInput",
  "fields": [
    {
      "name": "id",
      "type": ["null", "string"],
      "doc": "The identifier for an actor.",
      "default": null
    },
    {
      "name": "contactInput",
      "type": ["null", "model.ContactInput"],
      "doc": "",
      "default": null
    },
    {
      "name": "addressInput",
      "type": ["null", "model.Address"],
      "doc": "",
      "default": null
    }
  ]

}
cat ContactInput.avsc 
{
  "namespace": "model",
  "type": "record",
  "doc": "The contact input.",
  "name": "ContactInput",
  "fields": [
    {
      "name": "contact",
      "type": ["null", "model.Contact"],
      "doc": "",
      "default": null
    }
  ]

}
0

There are 0 best solutions below