def warn_if_schema_already_in_spec(self, schema_key):
        """Method to warn the user if the schema has already been added to the
        spec.
        """
        if schema_key in self.openapi.refs:
            warnings.warn(
                "{} has already been added to the spec. Adding it twice may "
                "cause references to not resolve properly.".format(schema_key[0]),
                UserWarning,
            )
def warn_if_schema_already_in_spec ( self , schema_key ) : if schema_key in self . openapi . refs : warnings . warn ( "{} has already been added to the spec. Adding it twice may " "cause references to not resolve properly." . format ( schema_key [ 0 ] ) , UserWarning , )
Method to warn the user if the schema has already been added to the
        spec.