How to make the API bring data from two schemas?

I would like to know if it is possible for the API to return the value of two schemas in sequence.

Ex:
schema “schema1”
generate 2
schema “schema2”
generate 2

But in this way it only returns the value of the second scheme.