Retrieves the name of an argument. Args: argument: The core schema. Returns: The name of the argument.
(self, argument: core_schema.ArgumentsParameter | core_schema.ArgumentsV3Parameter)
| 1951 | return json_schema |
| 1952 | |
| 1953 | def get_argument_name(self, argument: core_schema.ArgumentsParameter | core_schema.ArgumentsV3Parameter) -> str: |
| 1954 | """Retrieves the name of an argument. |
| 1955 | |
| 1956 | Args: |
| 1957 | argument: The core schema. |
| 1958 | |
| 1959 | Returns: |
| 1960 | The name of the argument. |
| 1961 | """ |
| 1962 | name = argument['name'] |
| 1963 | if self.by_alias: |
| 1964 | alias = argument.get('alias') |
| 1965 | if isinstance(alias, str): |
| 1966 | name = alias |
| 1967 | else: |
| 1968 | pass # might want to do something else? |
| 1969 | return name |
| 1970 | |
| 1971 | def arguments_v3_schema(self, schema: core_schema.ArgumentsV3Schema) -> JsonSchemaValue: |
| 1972 | """Generates a JSON schema that matches a schema that defines a function's arguments. |
no test coverage detected