Class GenerateOperationSchema

java.lang.Object
zeroecho.pki.server.schema.GenerateOperationSchema

public final class GenerateOperationSchema extends Object
Build-time generator for complete JSON and TypeScript catalog projections.

Invoked by the generateSchema Gradle task. Accepts the output file path as its first argument and an optional TypeScript output path as its second. Writes UTF-8 artifacts containing every operation, including unavailable entries.

  • Method Details

    • main

      public static void main(String[] args) throws IOException
      Writes the requested catalog artifacts.
      Parameters:
      args - JSON output path followed by an optional TypeScript output path
      Throws:
      IOException - if either artifact cannot be written
    • serialize

      public static byte[] serialize(List<OperationParameterSchema.OperationSpec> operations) throws IOException
      Serializes an operation schema list to a UTF-8 JSON byte array.
      Parameters:
      operations - ordered schemas to serialize
      Returns:
      JSON array containing the supplied schemas and known catalog metadata
      Throws:
      IOException - if JSON serialization fails