mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	openapi: Make endpoint operationId dash-separated.
The operationId is directly used in URLs of API doc pages to find the OpenAPI data to render. However, this is dash- separated in the URLs, and having underscore_separated IDs in OpenAPI data doesn't allow direct comparison of the two. This commit changes all OperationIDs from underscore_separated to dash-separated.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							644cd18dfd
						
					
				
				
					commit
					309f4ba145
				
			@@ -62,9 +62,7 @@ def test_generated_curl_examples_for_success(client: Client) -> None:
 | 
			
		||||
            # deleted and its page is generated by the
 | 
			
		||||
            # template. Thus, the curl example would just
 | 
			
		||||
            # a single one following the template's pattern.
 | 
			
		||||
            endpoint_path, endpoint_method = get_endpoint_from_operationid(
 | 
			
		||||
                endpoint.replace("-", "_")
 | 
			
		||||
            )
 | 
			
		||||
            endpoint_path, endpoint_method = get_endpoint_from_operationid(endpoint)
 | 
			
		||||
            endpoint_string = endpoint_path + ":" + endpoint_method
 | 
			
		||||
            command = f"{{generate_code_example(curl)|{endpoint_string}|example}}"
 | 
			
		||||
            curl_commands_to_test.append(command)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user