The UI allows a user to reorder and rename the exposed fields, but the UI state is ignored when generating the schema. Fix it