CINXE.COM
Google API Linter
<!DOCTYPE html> <html lang="en-US" class="glue-flexbox"> <head> <title>Google API Linter</title> <base href="https://linter.aip.dev/"> <meta charset='utf-8'> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width,maximum-scale=2"> <link href="//fonts.googleapis.com/css?family=Roboto:100,300,400,500,700|Google+Sans:400,500|Product+Sans:400&lang=en" rel="stylesheet"></link> <link rel="stylesheet" type="text/css" media="screen" href="//www.gstatic.com/glue/v21_0/glue.min.css"> <link rel="stylesheet" type="text/css" media="screen" href="/assets/css/style.css?v=c6747364ed300f1977f6f76441f4d5089fbca370"> <link rel="stylesheet" type="text/css" media="print" href="/assets/css/print.css?v=c6747364ed300f1977f6f76441f4d5089fbca370"> <script type="text/javascript" src="//code.jquery.com/jquery-3.4.0.min.js"></script> <script type="text/javascript" src="//www.gstatic.com/glue/latest/glue-detect.min.js"></script> <script type="text/javascript"> $('html').css('visibility', 'hidden'); $.when($.ready).then(() => { $('html').css('visibility', 'visible'); }); </script> <script type="text/javascript" src="/assets/js/global.js?v=c6747364ed300f1977f6f76441f4d5089fbca370"></script> <script type="text/javascript" src="assets/js/proto-syntax.js?v=c6747364ed300f1977f6f76441f4d5089fbca370"></script> <!-- Begin Jekyll SEO tag v2.8.0 --> <title>Google API Linter | api-linter</title> <meta name="generator" content="Jekyll v3.10.0" /> <meta property="og:title" content="Google API Linter" /> <meta property="og:locale" content="en_US" /> <meta name="description" content="A linter for APIs defined in protocol buffers." /> <meta property="og:description" content="A linter for APIs defined in protocol buffers." /> <link rel="canonical" href="https://linter.aip.dev/" /> <meta property="og:url" content="https://linter.aip.dev/" /> <meta property="og:site_name" content="api-linter" /> <meta property="og:type" content="website" /> <meta name="twitter:card" content="summary" /> <meta property="twitter:title" content="Google API Linter" /> <script type="application/ld+json"> {"@context":"https://schema.org","@type":"WebSite","description":"A linter for APIs defined in protocol buffers.","headline":"Google API Linter","name":"api-linter","url":"https://linter.aip.dev/"}</script> <!-- End Jekyll SEO tag --> </head> <body class="glue-page"> <svg class="svg-assets" xmlns="http://www.w3.org/2000/svg"> <!-- material design icons --> <symbol id="mi-arrow-forward" viewBox="0 0 18 18"> <path d="M9,1.5C4.8,1.5,1.5,4.8,1.5,9s3.3,7.5,7.5,7.5s7.5-3.3,7.5-7.5S13.2,1.5,9,1.5z M9,14.5l-1-1 l3.8-3.8H3.5V8.3h8.4L8.1,4.5L9,3.5L14.5,9L9,14.5z" ></path> </symbol> <symbol id="mi-help" viewBox="0 0 48 48"> <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm2 34h-4v-4h4v4zm4.13-15.49l-1.79 1.84C26.9 25.79 26 27 26 30h-4v-1c0-2.21.9-4.21 2.34-5.66l2.49-2.52C27.55 20.1 28 19.1 28 18c0-2.21-1.79-4-4-4s-4 1.79-4 4h-4c0-4.42 3.58-8 8-8s8 3.58 8 8c0 1.76-.71 3.35-1.87 4.51z" ></path> </symbol> <symbol id="mi-arrow-sort" viewBox="0 0 24 24"> <path d="M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z" ></path> </symbol> <symbol id="mi-arrow-forward-no-bg" viewBox="0 0 32 32"> <polygon points="16,0 13.2,2.8 24.3,14 0,14 0,18 24.3,18 13.2,29.2 16,32 32,16" ></polygon> </symbol> <symbol id="mi-arrow-circle" viewBox="0 0 16 16"> <path d="M0,8c0,4.4,3.6,8,8,8s8-3.6,8-8s-3.6-8-8-8S0,3.6,0,8z M4.2,6.1L8,9.9l3.8-3.8L13,7.3 l-5,5l-5-5L4.2,6.1z" ></path> </symbol> <symbol id="mi-arrow-item" viewBox="0 0 16 10"> <polygon points="1.8,0 7.8,5.9 13.7,0 15.5,1.8 7.8,9.6 0,1.8"></polygon> </symbol> <symbol id="mi-keyboard-arrow-right" viewBox="0 0 24 24"> <path d="M9.546 6.5l5.443 5.532L9.5 17.5"></path> </symbol> <symbol id="mi-chevron" viewBox="0 0 12 8"> <path d="M10.6,8L6,3.4L1.4,8L0,6.6l6-6l6,6L10.6,8z"></path> </symbol> <symbol id="mi-youtube-icon" viewBox="0 0 86 60"> <path d="M83.37 9.387c-.967-3.677-3.87-6.58-7.547-7.597C69.193 0 42.58 0 42.58 0S15.97 0 9.29 1.79c-3.677.968-6.532 3.87-7.548 7.597C0 16.065 0 30 0 30s0 13.935 1.79 20.613c.968 3.677 3.87 6.58 7.55 7.597C15.967 60 42.58 60 42.58 60s26.614 0 33.29-1.79c3.678-.968 6.533-3.87 7.55-7.597C85.16 43.935 85.16 30 85.16 30s0-13.935-1.79-20.613zm-49.5 33.29V17.323L56.13 30 33.87 42.677z" fill-rule="nonzero" ></path> </symbol> <symbol id="mi-youtube-icon-white"> <path d="M83.37 9.387c-.967-3.677-3.87-6.58-7.547-7.597C69.193 0 42.58 0 42.58 0S15.97 0 9.29 1.79c-3.677.968-6.532 3.87-7.548 7.597C0 16.065 0 30 0 30s0 13.935 1.79 20.613c.968 3.677 3.87 6.58 7.55 7.597C15.967 60 42.58 60 42.58 60s26.614 0 33.29-1.79c3.678-.968 6.533-3.87 7.55-7.597C85.16 43.935 85.16 30 85.16 30s0-13.935-1.79-20.613zm-49.5 33.29V17.323L56.13 30 33.87 42.677z" fill-rule="nonzero" fill="#FFF" ></path> </symbol> <symbol id="mi-youtube-icon-red"> <g fill-rule="nonzero" fill="none"> <path d="M83.37 9.387c-.967-3.677-3.87-6.58-7.547-7.597C69.193 0 42.58 0 42.58 0S15.97 0 9.29 1.79c-3.677.968-6.532 3.87-7.548 7.597C0 16.065 0 30 0 30s0 13.935 1.79 20.613c.968 3.677 3.87 6.58 7.55 7.597C15.967 60 42.58 60 42.58 60s26.614 0 33.29-1.79c3.678-.968 6.533-3.87 7.55-7.597C85.16 43.935 85.16 30 85.16 30s0-13.935-1.79-20.613z" fill="#F00" ></path> <path fill="#FFF" d="M33.87 42.677L56.13 30 33.87 17.323"></path> </g> </symbol> <symbol id="mi-youtube-icon-black"> <g fill-rule="nonzero" fill="none"> <path d="M83.37 9.387c-.967-3.677-3.87-6.58-7.547-7.597C69.193 0 42.58 0 42.58 0S15.97 0 9.29 1.79c-3.677.968-6.532 3.87-7.548 7.597C0 16.065 0 30 0 30s0 13.935 1.79 20.613c.968 3.677 3.87 6.58 7.55 7.597C15.967 60 42.58 60 42.58 60s26.614 0 33.29-1.79c3.678-.968 6.533-3.87 7.55-7.597C85.16 43.935 85.16 30 85.16 30s0-13.935-1.79-20.613z" fill="#282828" ></path> <path fill="#FFF" d="M33.87 42.677L56.13 30 33.87 17.323"></path> </g> </symbol> <symbol id="mi-pdf-icon" viewBox="0 0 24 24"> <path d="M7 11.5h1v-1H7v1zM19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9.5 8.5c0 .83-.67 1.5-1.5 1.5H7v2H5.5V9H8c.83 0 1.5.67 1.5 1.5v1zm10-1H17v1h1.5V13H17v2h-1.5V9h4v1.5zm-5 3c0 .83-.67 1.5-1.5 1.5h-2.5V9H13c.83 0 1.5.67 1.5 1.5v3zm-2.5 0h1v-3h-1v3z" ></path> </symbol> <symbol id="mi-arrow-dropdown" viewBox="0 0 24 24"> <path d="M7 10l5 5 5-5z"></path> </symbol> <symbol id="mi-search" viewBox="0 0 24 22"> <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" ></path> </symbol> <symbol id="mi-expand" viewBox="0 0 24 24"> <path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"></path> </symbol> <symbol id="mi-mail" viewBox="0 0 24 24"> <path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V8l8 5 8-5v10zm-8-7L4 6h16l-8 5z" ></path> </symbol> <symbol id="mi-close" viewBox="0 0 24 24"> <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" ></path> </symbol> <!-- Social icons --> <symbol id="social-blogger" viewBox="2 2 20 20"> <path d="M20,2 L4,2 C2.895,2 2.01,2.895 2.01,4 L2,20 C2,21.105 2.895,22 4,22 L20,22 C21.105,22 22,21.105 22,20 L22,4 C22,2.895 21.105,2 20,2 L20,2 Z M16,9 L16,10 C16,10.555 16.445,11 17,11 C17.555,11 18,11.445 18,12 L18,15 C18,16.655 16.655,18 15,18 L9,18 C7.345,18 6,16.655 6,15 L6,8 C6,6.345 7.345,5 9,5 L13,5 C14.655,5 16,6.345 16,8 L16,9 L16,9 Z M9.95,10 L12.55,10 C13.105,10 13.55,9.555 13.55,9 C13.55,8.445 13.105,8 12.55,8 L9.95,8 C9.395,8 8.95,8.445 8.95,9 C8.95,9.555 9.4,10 9.95,10 L9.95,10 Z M14,13 L9.95,13 C9.395,13 8.95,13.445 8.95,14 C8.95,14.555 9.395,15 9.95,15 L14,15 C14.555,15 15,14.555 15,14 C15,13.445 14.555,13 14,13 L14,13 Z" ></path> </symbol> <symbol id="social-facebook" viewBox="0 0 20 21"> <path d="M18.9,0H1.1C0.5,0,0,0.5,0,1.1v17.8C0,19.5,0.5,20,1.1,20h9.6v-7.7H8.1v-3h2.6V7c0-2.6,1.6-4,3.9-4c1.1,0,2.1,0.1,2.3,0.1 v2.7l-1.6,0c-1.3,0-1.5,0.6-1.5,1.5v1.9h3l-0.4,3h-2.6V20h5.1c0.6,0,1.1-0.5,1.1-1.1V1.1C20,0.5,19.5,0,18.9,0z" ></path> </symbol> <symbol id="social-instagram" viewBox="2 2 20 20"> <path d="M12,3.80440476 C14.6692857,3.80440476 14.9854365,3.81456349 16.0395635,3.86265873 C17.014246,3.90714286 17.5435714,4.07 17.895873,4.20686508 C18.3624603,4.38821429 18.6955159,4.60488095 19.0453175,4.95468254 C19.395119,5.30448413 19.6117857,5.63753968 19.7930952,6.10412698 C19.93,6.45642857 20.0928571,6.98575397 20.1373413,7.96039683 C20.1854365,9.01456349 20.1955952,9.33071429 20.1955952,12 C20.1955952,14.6692857 20.1854365,14.9854365 20.1373413,16.0395635 C20.0928571,17.014246 19.93,17.5435714 19.7930952,17.895873 C19.6117857,18.3624603 19.395119,18.6955159 19.0453175,19.0453175 C18.6955159,19.395119 18.3624603,19.6117857 17.895873,19.7930952 C17.5435714,19.93 17.014246,20.0928571 16.0395635,20.1373413 C14.9855952,20.1854365 14.6694444,20.1955952 12,20.1955952 C9.33055556,20.1955952 9.01440476,20.1854365 7.96043651,20.1373413 C6.98575397,20.0928571 6.45642857,19.93 6.10416667,19.7930952 C5.63753968,19.6117857 5.30448413,19.395119 4.95468254,19.0453175 C4.60488095,18.6955159 4.38821429,18.3624603 4.20690476,17.895873 C4.07,17.5435714 3.90714286,17.014246 3.86265873,16.0396032 C3.81456349,14.9854365 3.80440476,14.6692857 3.80440476,12 C3.80440476,9.33071429 3.81456349,9.01456349 3.86265873,7.96043651 C3.90714286,6.98575397 4.07,6.45642857 4.20690476,6.10412698 C4.38821429,5.63753968 4.60488095,5.30448413 4.95468254,4.95468254 C5.30448413,4.60488095 5.63753968,4.38821429 6.10416667,4.20686508 C6.45642857,4.07 6.98575397,3.90714286 7.96039683,3.86265873 C9.01456349,3.81456349 9.33071429,3.80440476 12,3.80440476 M12,2.00313492 C9.285,2.00313492 8.94460317,2.01464286 7.87833333,2.06329365 C6.81424603,2.11186508 6.08757937,2.28083333 5.45166667,2.52797619 C4.79428571,2.78345238 4.23678571,3.12527778 3.68103175,3.68103175 C3.12527778,4.23678571 2.78345238,4.79428571 2.52797619,5.45166667 C2.28083333,6.08757937 2.11186508,6.81424603 2.06329365,7.87833333 C2.01464286,8.94456349 2.0031746,9.285 2.0031746,12 C2.0031746,14.715 2.01464286,15.0554365 2.06329365,16.1216667 C2.11186508,17.185754 2.28083333,17.9124206 2.52797619,18.5483333 C2.78345238,19.2056746 3.12527778,19.7632143 3.68103175,20.3189683 C4.23678571,20.8747222 4.79428571,21.2165476 5.45166667,21.4720238 C6.08757937,21.7191667 6.81424603,21.8881349 7.87833333,21.9367063 C8.94460317,21.9853571 9.285,21.9968254 12,21.9968254 C14.715,21.9968254 15.0554365,21.9853571 16.1216667,21.9367063 C17.185754,21.8881349 17.9124206,21.7191667 18.5483333,21.4720238 C19.2057143,21.2165476 19.7632143,20.8747222 20.3189683,20.3189683 C20.8747222,19.7632143 21.2165476,19.2057143 21.4720238,18.5483333 C21.7191667,17.9124206 21.8881349,17.185754 21.9367063,16.1216667 C21.9853571,15.0554365 21.9968651,14.715 21.9968651,12 C21.9968651,9.285 21.9853571,8.94456349 21.9367063,7.87833333 C21.8881349,6.81424603 21.7191667,6.08757937 21.4720238,5.45166667 C21.2165476,4.79428571 20.8747222,4.23678571 20.3189683,3.68103175 C19.7632143,3.12527778 19.2057143,2.78345238 18.5483333,2.52797619 C17.9124206,2.28083333 17.185754,2.11186508 16.1216667,2.06329365 C15.0554365,2.01464286 14.715,2.00313492 12,2.00313492" ></path> <path d="M12,6.86646825 C9.16484127,6.86646825 6.86646825,9.16484127 6.86646825,12 C6.86646825,14.8351587 9.16484127,17.1335317 12,17.1335317 C14.8351587,17.1335317 17.1335317,14.8351587 17.1335317,12 C17.1335317,9.16484127 14.8351587,6.86646825 12,6.86646825 Z M12,15.3323016 C10.1596429,15.3323016 8.66769841,13.8403571 8.66769841,12 C8.66769841,10.1596429 10.1596429,8.66769841 12,8.66769841 C13.8403571,8.66769841 15.3323016,10.1596429 15.3323016,12 C15.3323016,13.8403571 13.8403571,15.3323016 12,15.3323016 L12,15.3323016 Z" ></path> <path d="M18.5359524,6.66365079 C18.5359524,7.32619048 17.9988889,7.86329365 17.3363492,7.86329365 C16.6738095,7.86329365 16.1367063,7.32619048 16.1367063,6.66365079 C16.1367063,6.00111111 16.6738095,5.46404762 17.3363492,5.46404762 C17.9988889,5.46404762 18.5359524,6.00111111 18.5359524,6.66365079" ></path> </symbol> <symbol id="social-link" viewBox="2 7 20 11"> <path d="M3.9,12 C3.9,10.29 5.29,8.9 7,8.9 L11,8.9 L11,7 L7,7 C4.24,7 2,9.24 2,12 C2,14.76 4.24,17 7,17 L11,17 L11,15.1 L7,15.1 C5.29,15.1 3.9,13.71 3.9,12 L3.9,12 Z M8,13 L16,13 L16,11 L8,11 L8,13 L8,13 Z M17,7 L13,7 L13,8.9 L17,8.9 C18.71,8.9 20.1,10.29 20.1,12 C20.1,13.71 18.71,15.1 17,15.1 L13,15.1 L13,17 L17,17 C19.76,17 22,14.76 22,12 C22,9.24 19.76,7 17,7 L17,7 Z" ></path> </symbol> <symbol id="social-linkedin" viewBox="0 0 20 20"> <path d="M17.3247508,17.0422222 L14.3116279,17.0422222 L14.3116279,12.4011111 C14.3116279,11.2944444 14.2901661,9.87055556 12.7443522,9.87055556 C11.1748173,9.87055556 10.9353488,11.0755556 10.9353488,12.3211111 L10.9353488,17.0422222 L7.92335548,17.0422222 L7.92335548,7.49833333 L10.8139203,7.49833333 L10.8139203,8.80222222 L10.8557143,8.80222222 C11.2578405,8.05166667 12.2422591,7.26055556 13.7090033,7.26055556 C16.7605316,7.26055556 17.3247508,9.23666667 17.3247508,11.8072222 L17.3247508,17.0422222 L17.3247508,17.0422222 Z M4.52335548,6.19277778 C3.55418605,6.19277778 2.77365449,5.42222222 2.77365449,4.47277778 C2.77365449,3.52444444 3.55418605,2.75333333 4.52335548,2.75333333 C5.48800664,2.75333333 6.27136213,3.52444444 6.27136213,4.47277778 C6.27136213,5.42222222 5.48800664,6.19277778 4.52335548,6.19277778 L4.52335548,6.19277778 Z M3.01312292,7.49833333 L6.03189369,7.49833333 L6.03189369,17.0422222 L3.01312292,17.0422222 L3.01312292,7.49833333 Z M18.5183745,0 L1.47495903,0 C0.661092747,0 0,0.645555556 0,1.44111111 L0,18.5566667 C0,19.3533333 0.661092747,20 1.47495903,20 L18.5183745,20 C19.3339074,20 20,19.3533333 20,18.5566667 L20,1.44111111 C20,0.645555556 19.3339074,0 18.5183745,0 L18.5183745,0 Z" ></path> </symbol> <symbol id="social-mail" viewBox="2 4 20 16"> <path d="M20,4 L4,4 C2.9,4 2.01,4.9 2.01,6 L2,18 C2,19.1 2.9,20 4,20 L20,20 C21.1,20 22,19.1 22,18 L22,6 C22,4.9 21.1,4 20,4 Z M20,18 L4,18 L4,8 L12,13 L20,8 L20,18 Z M12,11 L4,6 L20,6 L12,11 Z" ></path> </symbol> <symbol id="social-twitter" viewBox="2 4 20 17"> <path d="M21.9998024,5.94850271 C21.2639378,6.27899473 20.4732072,6.50243431 19.6431192,6.60281913 C20.4903254,6.08859695 21.1409646,5.27418342 21.4472639,4.3038956 C20.6544849,4.7801123 19.7764073,5.12586577 18.8417079,5.31226298 C18.0932607,4.50466524 17.0268825,4 15.8467486,4 C13.5805579,4 11.7434203,5.86056413 11.7434203,8.15526483 C11.7434203,8.48101542 11.7797051,8.7980981 11.8496412,9.10221596 C8.43952817,8.92893175 5.41611168,7.27461954 3.39235612,4.76062801 C3.03916454,5.37434599 2.83681824,6.08815245 2.83681824,6.84966948 C2.83681824,8.29128441 3.5611975,9.5631712 4.66217788,10.3083896 C3.98959225,10.2868309 3.35687602,10.099841 2.8036791,9.78861106 C2.80338648,9.80594689 2.80331333,9.8233568 2.80331333,9.8408408 C2.80331333,11.8541677 4.21768905,13.5336687 6.09476916,13.9154273 C5.75042931,14.0103299 5.38794707,14.0610779 5.01376005,14.0610779 C4.74930529,14.0610779 4.49231233,14.0350742 4.241757,13.9865487 C4.76393626,15.637453 6.27926567,16.8388111 8.07477813,16.8724456 C6.67042461,17.9869023 4.9012479,18.6511461 2.97881179,18.6511461 C2.64763982,18.6511461 2.32100345,18.6315136 2,18.5931378 C3.81592266,19.7721223 5.97267373,20.4599991 8.28985336,20.4599991 C15.8371653,20.4599991 19.9642689,14.1282728 19.9642689,8.63711197 C19.9642689,8.45693788 19.9602454,8.2777269 19.9524178,8.0995531 C20.7540486,7.51369099 21.449678,6.78180786 21.9998024,5.94850271" ></path> </symbol> <symbol id="social-youtube" viewBox="0 4 24 18"> <path d="M23.74,7.6062 C23.74,7.6062 23.51,5.9562 22.79,5.2362 C21.88,4.2762 20.86,4.2762 20.39,4.2162 C17.04,3.9712 12,4.0012 12,4.0012 C12,4.0012 6.98,3.9712 3.63,4.2112 C3.17,4.2712 2.15,4.2712 1.24,5.2312 C0.52,5.9512 0.28,7.6012 0.28,7.6012 C0.28,7.6012 0.04,9.5462 0,11.4812 L0,13.5062 C0.04,15.4462 0.28,17.3812 0.28,17.3812 C0.28,17.3812 0.52,19.0312 1.24,19.7612 C2.15,20.7112 3.34,20.6812 3.88,20.7812 C5.76,20.9612 11.79,21.0012 12,21.0012 C12,21.0012 17.05,21.0112 20.4,20.7712 C20.86,20.7112 21.88,20.7112 22.79,19.7512 C23.51,19.0312 23.75,17.3812 23.75,17.3812 C23.75,17.3812 23.99,15.4412 24,13.5062 L24,11.4812 C23.98,9.5462 23.74,7.6062 23.74,7.6062 L23.74,7.6062 Z M9.57,16.0012 L9.57,8.9912 L16,12.6312 L9.57,16.0012 L9.57,16.0012 Z" ></path> </symbol> <symbol id="google-logo" viewBox="0 0 396 130"> <path d="M51.0745265,101.038701 C23.3283097,101.038701 9.65724009e-07,78.4212338 9.65724009e-07,50.645974 C-0.00548030982,22.8707143 23.3228284,0.253246753 51.0745265,0.253246753 C66.4220981,0.253246753 77.3517615,6.27798701 85.5736748,14.1408766 L75.8718171,23.8528896 C69.9794459,18.3219805 61.9987087,14.0201623 51.0690452,14.0201623 C30.8102508,14.0201623 14.9693645,30.365974 14.9693645,50.645974 C14.9693645,70.925974 30.8102508,87.2717857 51.0690452,87.2717857 C64.2076627,87.2717857 71.6950851,81.9877922 76.48572,77.1921429 C80.4157945,73.2579545 82.991994,67.6063312 83.9731424,59.8641558 L51.0745265,59.8641558 L51.0745265,46.1027273 L97.3638985,46.1027273 C97.8572133,48.5609091 98.0983894,51.5129221 98.0983894,54.7063636 C98.0983894,65.0329221 95.2755325,77.8121753 86.1875777,86.9096429 C77.3462802,96.1223377 66.0548526,101.038701 51.0745265,101.038701 L51.0745265,101.038701 Z" ></path> <path d="M167.573556,68.369026 C167.573556,87.0523052 152.965957,100.813734 135.036704,100.813734 C117.112933,100.813734 102.499853,87.0468182 102.499853,68.369026 C102.499853,49.5650325 117.112933,35.9188312 135.036704,35.9188312 C152.965957,35.9188312 167.573556,49.5650325 167.573556,68.369026 L167.573556,68.369026 Z M153.333202,68.369026 C153.333202,56.6926623 144.85915,48.7035714 135.036704,48.7035714 C125.214259,48.7035714 116.740207,56.6926623 116.740207,68.369026 C116.740207,79.9191883 125.214259,88.0344805 135.036704,88.0344805 C144.85915,88.0344805 153.333202,79.9191883 153.333202,68.369026 L153.333202,68.369026 Z" ></path> <path d="M238.282011,68.369026 C238.282011,87.0523052 223.674411,100.813734 205.745159,100.813734 C187.821388,100.813734 173.208307,87.0468182 173.208307,68.369026 C173.208307,49.5650325 187.821388,35.9188312 205.745159,35.9188312 C223.674411,35.9188312 238.282011,49.5650325 238.282011,68.369026 L238.282011,68.369026 Z M224.041657,68.369026 C224.041657,56.6926623 215.567605,48.7035714 205.745159,48.7035714 C195.922713,48.7035714 187.448661,56.6926623 187.448661,68.369026 C187.448661,79.9191883 195.922713,88.0344805 205.745159,88.0344805 C215.567605,88.0344805 224.041657,79.9191883 224.041657,68.369026 L224.041657,68.369026 Z" ></path> <path d="M306.04702,37.943539 L306.04702,96.1442857 C306.04702,120.111558 291.927254,129.944286 275.231289,129.944286 C259.516472,129.944286 250.061272,119.376299 246.498443,110.772662 L258.897088,105.609383 C261.106042,110.893377 266.51058,117.159545 275.225808,117.159545 C285.908814,117.159545 292.535676,110.52026 292.535676,98.1086364 L292.535676,93.4391883 L292.047842,93.4391883 C288.85774,97.3733766 282.71323,100.813734 274.97915,100.813734 C258.771019,100.813734 243.916762,86.6791883 243.916762,68.4897403 C243.916762,50.1740909 258.771019,35.9188312 274.97915,35.9188312 C282.71323,35.9188312 288.852259,39.3591883 292.047842,43.1726623 L292.535676,43.1726623 L292.535676,37.943539 L306.04702,37.943539 L306.04702,37.943539 Z M293.522306,68.4897403 C293.522306,57.0602922 285.908814,48.7035714 276.212437,48.7035714 C266.389992,48.7035714 258.162597,57.0602922 258.162597,68.4897403 C258.162597,79.798474 266.389992,88.0344805 276.212437,88.0344805 C285.908814,88.0344805 293.522306,79.798474 293.522306,68.4897403 L293.522306,68.4897403 Z" ></path> <path d="M329.961825,3.54545455 L329.961825,98.9207143 L315.721472,98.9207143 L315.721472,3.54545455 L329.961825,3.54545455 L329.961825,3.54545455 Z" ></path> <path d="M383.755064,79.0577273 L394.805315,86.4322727 C391.242486,91.7162662 382.647846,100.813734 367.793589,100.813734 C349.376503,100.813734 336.002191,86.558474 336.002191,68.369026 C336.002191,49.0712013 349.497091,35.9188312 366.198538,35.9188312 C383.020573,35.9188312 391.247967,49.3181169 393.944755,56.566461 L395.419218,60.2537338 L352.078772,78.1962662 C355.394944,84.7093506 360.552824,88.0289935 367.793589,88.0289935 C375.039836,88.0289935 380.071647,84.4624351 383.755064,79.0577273 L383.755064,79.0577273 Z M349.743749,67.3813636 L378.717771,55.3373701 C377.12272,51.2824675 372.332085,48.4566558 366.686372,48.4566558 C359.445607,48.4511688 349.376503,54.843539 349.743749,67.3813636 L349.743749,67.3813636 Z" ></path> </symbol> <symbol id="social-share-triangle" viewBox="0 0 24 24"> <path d="M18,16.08 C17.24,16.08 16.56,16.38 16.04,16.85 L8.91,12.7 C8.96,12.47 9,12.24 9,12 C9,11.76 8.96,11.53 8.91,11.3 L15.96,7.19 C16.5,7.69 17.21,8 18,8 C19.66,8 21,6.66 21,5 C21,3.34 19.66,2 18,2 C16.34,2 15,3.34 15,5 C15,5.24 15.04,5.47 15.09,5.7 L8.04,9.81 C7.5,9.31 6.79,9 6,9 C4.34,9 3,10.34 3,12 C3,13.66 4.34,15 6,15 C6.79,15 7.5,14.69 8.04,14.19 L15.16,18.35 C15.11,18.56 15.08,18.78 15.08,19 C15.08,20.61 16.39,21.92 18,21.92 C19.61,21.92 20.92,20.61 20.92,19 C20.92,17.39 19.61,16.08 18,16.08 L18,16.08 Z" ></path> </symbol> <symbol id="glue-color-google-logo" viewBox="0 0 74 24"> <path fill="#4285F4" d="M9.24 8.19v2.46h5.88c-.18 1.38-.64 2.39-1.34 3.1-.86.86-2.2 1.8-4.54 1.8-3.62 0-6.45-2.92-6.45-6.54s2.83-6.54 6.45-6.54c1.95 0 3.38.77 4.43 1.76L15.4 2.5C13.94 1.08 11.98 0 9.24 0 4.28 0 .11 4.04.11 9s4.17 9 9.13 9c2.68 0 4.7-.88 6.28-2.52 1.62-1.62 2.13-3.91 2.13-5.75 0-.57-.04-1.1-.13-1.54H9.24z" ></path> <path fill="#EA4335" d="M25 6.19c-3.21 0-5.83 2.44-5.83 5.81 0 3.34 2.62 5.81 5.83 5.81s5.83-2.46 5.83-5.81c0-3.37-2.62-5.81-5.83-5.81zm0 9.33c-1.76 0-3.28-1.45-3.28-3.52 0-2.09 1.52-3.52 3.28-3.52s3.28 1.43 3.28 3.52c0 2.07-1.52 3.52-3.28 3.52z" ></path> <path fill="#4285F4" d="M53.58 7.49h-.09c-.57-.68-1.67-1.3-3.06-1.3C47.53 6.19 45 8.72 45 12c0 3.26 2.53 5.81 5.43 5.81 1.39 0 2.49-.62 3.06-1.32h.09v.81c0 2.22-1.19 3.41-3.1 3.41-1.56 0-2.53-1.12-2.93-2.07l-2.22.92c.64 1.54 2.33 3.43 5.15 3.43 2.99 0 5.52-1.76 5.52-6.05V6.49h-2.42v1zm-2.93 8.03c-1.76 0-3.1-1.5-3.1-3.52 0-2.05 1.34-3.52 3.1-3.52 1.74 0 3.1 1.5 3.1 3.54.01 2.03-1.36 3.5-3.1 3.5z" ></path> <path fill="#FBBC05" d="M38 6.19c-3.21 0-5.83 2.44-5.83 5.81 0 3.34 2.62 5.81 5.83 5.81s5.83-2.46 5.83-5.81c0-3.37-2.62-5.81-5.83-5.81zm0 9.33c-1.76 0-3.28-1.45-3.28-3.52 0-2.09 1.52-3.52 3.28-3.52s3.28 1.43 3.28 3.52c0 2.07-1.52 3.52-3.28 3.52z" ></path> <path fill="#34A853" d="M58 .24h2.51v17.57H58z"></path> <path fill="#EA4335" d="M68.26 15.52c-1.3 0-2.22-.59-2.82-1.76l7.77-3.21-.26-.66c-.48-1.3-1.96-3.7-4.97-3.7-2.99 0-5.48 2.35-5.48 5.81 0 3.26 2.46 5.81 5.76 5.81 2.66 0 4.2-1.63 4.84-2.57l-1.98-1.32c-.66.96-1.56 1.6-2.86 1.6zm-.18-7.15c1.03 0 1.91.53 2.2 1.28l-5.25 2.17c0-2.44 1.73-3.45 3.05-3.45z" ></path> </symbol> <symbol id="glue-white-google-logo" viewBox="0 0 74 24"> <path d="M9.24 8.19v2.46h5.88c-.18 1.38-.64 2.39-1.34 3.1-.86.86-2.2 1.8-4.54 1.8-3.62 0-6.45-2.92-6.45-6.54s2.83-6.54 6.45-6.54c1.95 0 3.38.77 4.43 1.76L15.4 2.5C13.94 1.08 11.98 0 9.24 0 4.28 0 .11 4.04.11 9s4.17 9 9.13 9c2.68 0 4.7-.88 6.28-2.52 1.62-1.62 2.13-3.91 2.13-5.75 0-.57-.04-1.1-.13-1.54H9.24zm15.76-2c-3.21 0-5.83 2.44-5.83 5.81 0 3.34 2.62 5.81 5.83 5.81s5.83-2.46 5.83-5.81c0-3.37-2.62-5.81-5.83-5.81zm0 9.33c-1.76 0-3.28-1.45-3.28-3.52 0-2.09 1.52-3.52 3.28-3.52s3.28 1.43 3.28 3.52c0 2.07-1.52 3.52-3.28 3.52zm28.58-8.03h-.09c-.57-.68-1.67-1.3-3.06-1.3C47.53 6.19 45 8.72 45 12c0 3.26 2.53 5.81 5.43 5.81 1.39 0 2.49-.62 3.06-1.32h.09v.81c0 2.22-1.19 3.41-3.1 3.41-1.56 0-2.53-1.12-2.93-2.07l-2.22.92c.64 1.54 2.33 3.43 5.15 3.43 2.99 0 5.52-1.76 5.52-6.05V6.49h-2.42v1zm-2.93 8.03c-1.76 0-3.1-1.5-3.1-3.52 0-2.05 1.34-3.52 3.1-3.52 1.74 0 3.1 1.5 3.1 3.54.01 2.03-1.36 3.5-3.1 3.5zM38 6.19c-3.21 0-5.83 2.44-5.83 5.81 0 3.34 2.62 5.81 5.83 5.81s5.83-2.46 5.83-5.81c0-3.37-2.62-5.81-5.83-5.81zm0 9.33c-1.76 0-3.28-1.45-3.28-3.52 0-2.09 1.52-3.52 3.28-3.52s3.28 1.43 3.28 3.52c0 2.07-1.52 3.52-3.28 3.52zM58 .24h2.51v17.57H58zm10.26 15.28c-1.3 0-2.22-.59-2.82-1.76l7.77-3.21-.26-.66c-.48-1.3-1.96-3.7-4.97-3.7-2.99 0-5.48 2.35-5.48 5.81 0 3.26 2.46 5.81 5.76 5.81 2.66 0 4.2-1.63 4.84-2.57l-1.98-1.32c-.66.96-1.56 1.6-2.86 1.6zm-.18-7.15c1.03 0 1.91.53 2.2 1.28l-5.25 2.17c0-2.44 1.73-3.45 3.05-3.45z" ></path> </symbol> <symbol id="glue-burger" viewBox="0 0 24 24"> <path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"></path> </symbol> </svg> <div class="glue-header glue-header--product-marketing-one-tier"> <div class="glue-header__bar"> <div class="glue-header__hamburger glue-header__hamburger--first-tier"> <div class="glue-header__hamburger-wrapper"> <button type="button" class="glue-js-header__drawer-toggle-link glue-header__hamburger-link" aria-controls="glue-js-header__drawer" aria-expanded="false" title="Open the navigation drawer"> <svg role="img" aria-label="Navigation" class="glue-header__hamburger-img glue-header__hamburger-img--standard"> <use xlink:href="#glue-burger"></use> </svg> <svg role="img" aria-label="Navigation" class="glue-header__hamburger-img glue-header__hamburger-img--reversed"> <use xlink:href="#glue-burger"></use> </svg> </button> </div> </div> <div class="glue-header__lockup"> <div class="glue-header__company-logo"> <a href="https://linter.aip.dev/" class="glue-header__company-logo-link title="Google"> <svg role="img" aria-label="Google" class="glue-header__company-logo-img glue-header__company-logo-img--standard"> <use xlink:href="#glue-color-google-logo"></use> </svg> <svg role="img" aria-label="Google" class="glue-header__company-logo-img glue-header__company-logo-img--reversed"> <use xlink:href="#glue-white-google-logo"></use> </svg> </a> </div> <div class="glue-header__product-logo"> <a href="https://linter.aip.dev/" class="glue-header__product-logo-link"> <span class="glue-header__product-logo-text">API Linter</span> </a> </div> <a href="#jump-content" class="glue-header__jump-to-content" data-glue-jump-link> <span class="glue-header__jump-to-content-text">Skip to content</span> </a> </div> <div class="glue-header__hamburger glue-header__hamburger--second-tier"> <div class="glue-header__hamburger-wrapper"> <button type="button" class="glue-header__hamburger-link" aria-controls="glue-js-header__drawer" aria-expanded="false" title="Open the navigation drawer"> <svg role="img" aria-label="Navigation" class="glue-header__hamburger-img glue-header__hamburger-img--standard"> <use xlink:href="#glue-burger"></use> </svg> <svg role="img" aria-label="Navigation" class="glue-header__hamburger-img glue-header__hamburger-img--reversed"> <use xlink:href="#glue-burger"></use> </svg> </button> </div> </div> <div class="glue-header__initiative-logo"> <a href="#" class="glue-header__initiative-logo-link"> <span class="glue-header__initiative-logo-text">Initiative</span> </a> </div> <nav class="glue-header__nav"> <ul class="glue-header__nav-list"> <li class="glue-header__nav-li" aria-level="1"> <a href="rules/" class="glue-header__nav-li-link"> Rule Documentation </a> </li> <li class="glue-header__nav-li" aria-level="1"> <a href="configuration" class="glue-header__nav-li-link"> Configuration </a> </li> <li class="glue-header__nav-li" aria-level="1"> <a href="contributing" class="glue-header__nav-li-link"> Contributing </a> </li> </ul> </nav> <div class="glue-header__cta"> <ul class="glue-header__cta-list"> <li class="glue-header__cta-li glue-header__cta-li--secondary"> <a href="https://aip.dev" class="glue-header__cta-li-link glue-header__cta-li-link--secondary " tabindex="0"> API Improvement Proposals </a> </li> <li class="glue-header__cta-li glue-header__cta-li--primary"> <a href="https://github.com/googleapis/api-linter" class="glue-header__cta-li-link glue-header__cta-li-link--primary"> <img src="assets/images/github.png" class="github-logo"> View on GitHub </a> </li> </ul> </div> <div class="glue-header__bar-underside"></div> </div> <div id="glue-js-header__drawer" class="glue-header__drawer" tabindex="0" aria-label="Navigation drawer"> <div class="glue-header__drawer-content"> <div class="glue-header__drawer-bar"> <div class="glue-header__drawer-lockup"> <div class="glue-header__drawer-company-logo"> <div class="glue-header__drawer-company-logo-link" title="Google"> <svg role="img" class="glue-header__drawer-company-logo-img"> <use xlink:href="#glue-color-google-logo"></use> </svg> </div> </div> <div class="glue-header__drawer-product-logo"> <div class="glue-header__drawer-product-logo-link"> <span class="glue-header__drawer-product-logo-text">API Linter</span> </div> </div> </div> </div> <nav class="glue-header__drawer-nav" id="api-linter-nav-mobile"> <ul class="glue-header__drawer-nav-list"> <li class="glue-header__drawer-nav-li drawer-heading"> <div class="drawer-heading-text">API Linter</div> </li> <li class="glue-header__drawer-nav-li" aria-level="1"> <a href="rules/" class="glue-header__drawer-nav-li-link"> Rule Documentation </a> </li> <li class="glue-header__drawer-nav-li" aria-level="1"> <a href="configuration" class="glue-header__drawer-nav-li-link"> Configuration </a> </li> <li class="glue-header__drawer-nav-li" aria-level="1"> <a href="contributing" class="glue-header__drawer-nav-li-link"> Contributing </a> </li> <li class="glue-header__drawer-nav-li" aria-level="1"> <button type="button" class="glue-header__drawer-nav-close-btn" id="glue-js-header__drawer-close-btn" aria-controls="glue-js-header__drawer" aria-expanded="true" aria-label="Close the navigation drawer" > Close navigation drawer </button> </li> </ul> </nav> </div> <div class="glue-header__drawer-cta"> <ul class="glue-header__drawer-cta-list"> <li class="glue-header__drawer-cta-li glue-header__drawer-cta-li--secondary"> <a href="https://github.com/googleapis/api-linter/issues" class="glue-header__drawer-cta-li-link glue-header__drawer-cta-li-link--secondary"> File an Issue </a> </li> <li class="glue-header__drawer-cta-li glue-header__drawer-cta-li--primary"> <a href="https://github.com/googleapis/api-linter" class="glue-header__drawer-cta-li-link glue-header__drawer-cta-li-link--primary"> <img src="assets/images/github.png" class="github-logo"> View on GitHub </a> </li> </ul> </div> </div> <!-- TODO (joshmarsh): include drawer backdrop as :before pseudo-element of drawer for simplicity and clarity of code --> <div id="glue-js-header__drawer-backdrop" class="glue-header__drawer-backdrop"></div> </div> <!-- end header --> <main role="main" class="hd-o-main" id="main"> <section id="jump-content"> <aside id="api-linter-sidebar" class="docs-component-sidebar"> <section id="linter-toc" class="docs-component-sidebar-toc"> <ul> <li class="toc-header">Contents</li> <li><a href="/#installation">Installation</a></li> <li><a href="/#usage">Usage</a></li> <li><a href="/#license">License</a></li> </ul> </section> <section class="docs-component-sidebar-actions"> <ul> <li> <a href="https://github.com/googleapis/api-linter/issues/"> File Bug </a> </li> <li> <a href="https://github.com/googleapis/api-linter/edit/main/docs/index.md"> Edit this page </a> </li> </ul> </section> </aside> <section id="linter-main" class="docs-component-main"> <nav class="glue-breadcrumbs glue-mod-mt-std no-breadcrumb" aria-label="You are here." > <!-- prettier-ignore --> <ol class="glue-breadcrumbs__list api-linter-breadcrumbs"> <li class="glue-breadcrumbs__item" aria-level="1"> <a class="glue-breadcrumbs__link" href="https://linter.aip.dev"> API Linter </a> </li> <li class="glue-breadcrumbs__item glue-breadcrumbs__item--active" aria-level="3" > Google API Linter </li> </ol> </nav> <h1 id="google-api-linter">Google API Linter</h1> <p><img src="https://github.com/googleapis/api-linter/workflows/ci/badge.svg" alt="ci" /> <img src="https://img.shields.io/github/v/release/googleapis/api-linter" alt="latest release" /> <img src="https://img.shields.io/github/go-mod/go-version/googleapis/api-linter" alt="go version" /></p> <p>The API linter provides real-time checks for compliance with many of Google鈥檚 API standards, documented using <a href="https://aip.dev/">API Improvement Proposals</a>. It operates on API surfaces defined in <a href="https://developers.google.com/protocol-buffers">protocol buffers</a>.</p> <p>It identifies common mistakes and inconsistencies in API surfaces:</p> <div class="language-proto highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1">// Incorrect.</span> <span class="kd">message</span> <span class="nc">GetBookRequest</span> <span class="p">{</span> <span class="c1">// This is wrong; it should be spelled `name`.</span> <span class="kt">string</span> <span class="na">book</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span> <span class="p">}</span> </code></pre></div></div> <p>When able, it also offers a suggestion for the correct fix.</p> <p><strong>Note:</strong> Not every piece of AIP guidance is able to be expressed as lint rules (and some things that are able to be expressed may not be written yet). The linter should be used as a useful tool, but not as a substitute for reading and understanding API guidance.</p> <p>Each linter rule has its own <a href="/rules/">rule documentation</a>, and rules can be <a href="/configuration.html">configured</a> using a config file, or in a proto file itself.</p> <h2 id="installation">Installation</h2> <p>To install <code class="language-plaintext highlighter-rouge">api-linter</code>, use <code class="language-plaintext highlighter-rouge">go install</code>:</p> <div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code>go <span class="nb">install </span>github.com/googleapis/api-linter/cmd/api-linter@latest </code></pre></div></div> <p>It will install <code class="language-plaintext highlighter-rouge">api-linter</code> into your local Go binary directory <code class="language-plaintext highlighter-rouge">$HOME/go/bin</code>. Ensure that your operating system鈥檚 <code class="language-plaintext highlighter-rouge">PATH</code> contains the Go binary directory.</p> <p><strong>Note:</strong> For working in Google-internal source control, you should use the released binary <code class="language-plaintext highlighter-rouge">/google/bin/releases/api-linter/api-linter</code>.</p> <h2 id="usage">Usage</h2> <div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code>api-linter proto_file1 proto_file2 ... </code></pre></div></div> <p>To see the help message, run <code class="language-plaintext highlighter-rouge">api-linter -h</code></p> <div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Usage of api-linter: --config string The linter config file. --debug Run in debug mode. Panics will print stack. --descriptor-set-in stringArray The file containing a FileDescriptorSet for searching proto imports. May be specified multiple times. --disable-rule stringArray Disable a rule with the given name. May be specified multiple times. --enable-rule stringArray Enable a rule with the given name. May be specified multiple times. --ignore-comment-disables If set to true, disable comments will be ignored. This is helpful when strict enforcement of AIPs are necessary and proto definitions should not be able to disable checks. --list-rules Print the rules and exit. Honors the output-format flag. --output-format string The format of the linting results. Supported formats include "yaml", "json","github" and "summary" table. YAML is the default. -o, --output-path string The output file path. If not given, the linting results will be printed out to STDOUT. -I, --proto-path stringArray The folder for searching proto imports. May be specified multiple times; directories will be searched in order. The current working directory is always used. --set-exit-status Return exit status 1 when lint errors are found. --version Print version and exit. </code></pre></div></div> <h2 id="license">License</h2> <p>This software is made available under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a> license.</p> <footer> The Google API linter, including its documentation, is licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 License</a>. </footer> </section> </section> </main> <!-- Closing scripts --> <script src="https://www.gstatic.com/external_hosted/hammerjs/v2_0_2/hammer.min.js"></script> <script src="//www.gstatic.com/glue/v21_0/glue-vanilla.min.js"></script> <script type="text/javascript"> glue.ui.header.Header.attachTo(document.querySelector('.glue-header')); if ($('.glue-expansion-panels').length > 0) { new glue.ui.GlueExpansionPanelsPanelGroup( document.querySelector('.glue-expansion-panels') ); } </script> </body> </html>