From 1b0c0fffb1b6267c2ad00c6c45a2a1d2af013aac Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Thu, 18 Jul 2024 14:41:57 -0400 Subject: [PATCH] Use ServiceGenerator logging conventions some as other tools. Some other tooling is using NAME.VERSION.json for the file names, so follow that style. They also use "index.json" for the directory listing, so use that also. --- Tools/ServiceGenerator/SGMain.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/ServiceGenerator/SGMain.m b/Tools/ServiceGenerator/SGMain.m index c3c24c850..64cb2e815 100644 --- a/Tools/ServiceGenerator/SGMain.m +++ b/Tools/ServiceGenerator/SGMain.m @@ -435,7 +435,7 @@ - (void)printUsage:(FILE *)outputFile brief:(BOOL)brief { - (void)maybeLogAPI:(GTLRDiscovery_RestDescription *)api { if (self.apiLogDir == nil) return; - NSString *fileName = [NSString stringWithFormat:@"%@_%@.json", + NSString *fileName = [NSString stringWithFormat:@"%@.%@.json", api.name, api.version]; NSString *filePath = [self.apiLogDir stringByAppendingPathComponent:fileName]; NSError *writeErr = nil; @@ -1186,7 +1186,7 @@ - (void)stateDirectory { } else { GTLRDiscovery_DirectoryList *apiList = (GTLRDiscovery_DirectoryList *)object; if (self.apiLogDir != nil) { - NSString *filePath = [self.apiLogDir stringByAppendingPathComponent:@"DirectoryList.json"]; + NSString *filePath = [self.apiLogDir stringByAppendingPathComponent:@"index.json"]; NSError *writeErr = nil; if (![apiList.JSONString writeToFile:filePath atomically:YES