(ast: SchemaAST.AST, _tag: HttpApiSchema.Encoding["_tag"])
| 859 | }) |
| 860 | |
| 861 | function toEncodingAST(ast: SchemaAST.AST, _tag: HttpApiSchema.Encoding["_tag"]): SchemaAST.AST { |
| 862 | switch (_tag) { |
| 863 | case "Uint8Array": |
| 864 | return Uint8ArrayEncoding.ast |
| 865 | case "Text": |
| 866 | return Schema.String.ast |
| 867 | case "FormUrlEncoded": |
| 868 | case "Json": |
| 869 | return ast |
| 870 | case "Multipart": |
| 871 | return persistedFileToBinaryEncoding(ast) |
| 872 | } |
| 873 | } |
| 874 | |
| 875 | function persistedFileToBinaryEncoding(ast: SchemaAST.AST): SchemaAST.AST { |
| 876 | if ( |
no test coverage detected