MCPcopy Create free account
hub / github.com/Effect-TS/effect / toEncodingAST

Function toEncodingAST

packages/effect/src/unstable/httpapi/OpenApi.ts:861–873  ·  view source on GitHub ↗
(ast: SchemaAST.AST, _tag: HttpApiSchema.Encoding["_tag"])

Source from the content-addressed store, hash-verified

859})
860
861function 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
875function persistedFileToBinaryEncoding(ast: SchemaAST.AST): SchemaAST.AST {
876 if (

Callers 2

processResponseBodiesFunction · 0.85
onEndpointFunction · 0.85

Calls 1

Tested by

no test coverage detected