Browse Source

Brought CodeRenderer from OpenAPI Generator. (#1728)

Motivation:

Provides an API which takes Structured Swift Representation of a file and generates an object containing the generated code as a String.

Modifications:

- Brought over RendererProtocol and TextBasedRenderer.
- Brought over unit tests in Test_TextBasedRenderer.
- Fixed TypeName bugs that produced errors while building.

Result:

The CodeGenLib will have a code renderer that transforms `StructuredSwiftRepresentation` into `SourceFile`.
Stefana-Ioana Dranca 2 years ago
parent
commit
b730253e40
1 changed files with 2 additions and 1 deletions
  1. 2 1
      NOTICES.txt

+ 2 - 1
NOTICES.txt

@@ -61,7 +61,8 @@ This product uses derivations of swift-extras/swift-extras-base64 'Base64.swift'
 ---
 
 This product uses derivations of apple/swift-openapi-generator 'StructuredSwiftRepresentation.swift',
-'TypeName.swift', 'TypeUsage.swift' and 'Builtins.swift'.
+'TypeName.swift', 'TypeUsage.swift', 'Builtins.swift', 'RendererProtocol.swift', 'TextBasedProtocol',
+and 'Test_TextBasedRenderer'.
     
     * LICENSE (Apache License 2.0):
       * https://github.com/apple/swift-openapi-generator/blob/main/LICENSE.txt