fixed schema gen to work properly with oauth. no 500 error anymore

fixes SPOT-737
Merge branch 'spot737'
Merge branch 'craig'