def _ask_openapi():
        """Return whether we should create a (new) skeleton."""
        if Path('openapi.yml').exists():
            question = 'Override local openapi.yml with a new skeleton? (y/N) '
            default = False
        else:
            question = 'Do you have REST endpoints and wish to create an API' \
                ' skeleton in openapi.yml? (Y/n) '
            default = True

        while True:
            answer = input(question)
            if answer == '':
                return default
            if answer.lower() in ['y', 'yes']:
                return True
            if answer.lower() in ['n', 'no']:
                return False
def _ask_openapi ( ) : if Path ( 'openapi.yml' ) . exists ( ) : question = 'Override local openapi.yml with a new skeleton? (y/N) ' default = False else : question = 'Do you have REST endpoints and wish to create an API' ' skeleton in openapi.yml? (Y/n) ' default = True while True : answer = input ( question ) if answer == '' : return default if answer . lower ( ) in [ 'y' , 'yes' ] : return True if answer . lower ( ) in [ 'n' , 'no' ] : return False
Return whether we should create a (new) skeleton.