Original: The German libretto was written by the composer after Carlo Gozzi's La donna serpente.
Simplified: The German libretto was written by the composer. He was adapting a story by Carlo Gozzi called La donna serpente.