diff --git a/CONTRIBUTING b/CONTRIBUTING index 84b550755..e55b28bd9 100644 --- a/CONTRIBUTING +++ b/CONTRIBUTING @@ -4,18 +4,18 @@ We are happy to accept contributions! This is what makes Open Source possible. W that you follow these guidelines when contributing. ## Issues -Found a bug or have an idea for a feature? You can help us by [creating an issue](https://github.com/zalando/zally/issues). +Found a bug or have an idea for a feature? You can help us by [creating an issue](https://github.com/schweizerischebundesbahnen/zally/issues). Just make sure that an issue describing the bug or feature does not already exist. You can go even further and -[open a Pull Request](https://github.com/zalando/zally/pulls) with the fix or proposed feature. +[open a Pull Request](https://github.com/schweizerischebundesbahnen/zally/pulls) with the fix or proposed feature. ## Pull Requests Follow these steps to contribute your work to Zally: -1. [Open an issue](https://github.com/zalando/zally/issues) describing the problem or proposed feature. Ask maintainers (in the issue thread) to assign the issue to you so we know who is working on what. +1. [Open an issue](https://github.com/schweizerischebundesbahnen/zally/issues) describing the problem or proposed feature. Ask maintainers (in the issue thread) to assign the issue to you so we know who is working on what. 1. Fork this repo and create a branch for your work. 1. Push changes to your branch. 1. Test your changes. -1. Open a [Pull Request](https://github.com/zalando/zally/pulls) when your code is ready for review. +1. Open a [Pull Request](https://github.com/schweizerischebundesbahnen/zally/pulls) when your code is ready for review. 1. Mention the issue number in the comment (e.g. Fixes #37). 1. We will review your PR, give feedback, and merge when it is ready. diff --git a/README.md b/README.md index 1ddf11d34..907e5f300 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Zally is a quality assurance tool. It's a linter for OpenAPI specifications, whi - Checks compliance - Delivers early feedback for API designers - Ensures the same look-and-feel of APIs -- Supports [API-First approach](https://opensource.zalando.com/restful-api-guidelines/#100) +- Supports API-First approach - Provides best practices and advices Its standard configuration will check your APIs against the rules defined in diff --git a/documentation/build-under-wsl.md b/documentation/build-under-wsl.md index 2f8303fe9..0b3d7dd13 100644 --- a/documentation/build-under-wsl.md +++ b/documentation/build-under-wsl.md @@ -52,7 +52,7 @@ The following notes document my working environment for building and testing a f ```bash cd /mnt/c - git clone https://github.com/zalando/zally + git clone https://github.com/schweizerischebundesbahnen/zally cd zally ## Build and Run diff --git a/examples/.travis.yml.example b/examples/.travis.yml.example index f992e898a..6d401ead7 100644 --- a/examples/.travis.yml.example +++ b/examples/.travis.yml.example @@ -10,7 +10,7 @@ jdk: install: # Clone Zally - - git clone https://github.com/zalando/zally.git + - git clone https://github.com/schweizerischebundesbahnen/zally.git # Build a local Zally server - cd zally/server diff --git a/logo.png b/logo.png index f3c7e9ec9..ea9263ed9 100755 Binary files a/logo.png and b/logo.png differ diff --git a/server/build.gradle.kts b/server/build.gradle.kts index 4059c85eb..68c070437 100644 --- a/server/build.gradle.kts +++ b/server/build.gradle.kts @@ -81,7 +81,7 @@ subprojects { from(components["java"]) pom { description.set("OpenAPI linter service") - url.set("https://github.com/zalando/zally") + url.set("https://github.com/schweizerischebundesbahnen/zally") name.set("OpenAPI linter") licenses { license { @@ -118,7 +118,7 @@ subprojects { scm { connection.set("scm:git:git://github.com/zalando/zally.git") developerConnection.set("scm:git:ssh://github.com:zalando/zally.git") - url.set("https://github.com/zalando/zally/tree/master") + url.set("https://github.com/schweizerischebundesbahnen/zally/tree/master") } } } diff --git a/server/rules.md b/server/rules.md index 71d172a92..ce9416255 100644 --- a/server/rules.md +++ b/server/rules.md @@ -12,6 +12,10 @@ The rules cannot be disabled or configured. Primarily Zally exists to enforce the various guidelines of the [Zalando RESTful API and Event Scheme Guidelines](http://zalando.github.io/restful-api-guidelines/). Individual rules descriptions won't be repeated here. +# SBBRuleSet + +We have added an SBB specific RuleSet which checks the compliance of the rules compared to [SBB's API Principles](https://schweizerischebundesbahnen.github.io/api-principles/). + # ZallyRuleSet Zally also contains some additional rules enforcing aspects of the OpenAPI spec or other common sense rules that don't form part of the Zalando guidelines. Those addiitonal rules are documented here. diff --git a/server/zally-core/src/main/kotlin/org/zalando/zally/core/RulesValidator.kt b/server/zally-core/src/main/kotlin/org/zalando/zally/core/RulesValidator.kt index 94418122a..73d6ec521 100644 --- a/server/zally-core/src/main/kotlin/org/zalando/zally/core/RulesValidator.kt +++ b/server/zally-core/src/main/kotlin/org/zalando/zally/core/RulesValidator.kt @@ -25,7 +25,7 @@ abstract class RulesValidator(val rules: RulesManager) : ApiValidat parseResult.violations.map { violation -> Result( id = "InternalRuleSet", - url = URI.create("https://github.com/zalando/zally/blob/master/server/rules.md"), + url = URI.create("https://github.com/schweizerischebundesbahnen/zally/blob/master/server/rules.md"), title = "Unable to parse API specification", description = violation.description, violationType = Severity.MUST, diff --git a/server/zally-ruleset-zally/src/main/kotlin/org/zalando/zally/ruleset/zally/ZallyRuleSet.kt b/server/zally-ruleset-zally/src/main/kotlin/org/zalando/zally/ruleset/zally/ZallyRuleSet.kt index e8fca167b..84292ff79 100644 --- a/server/zally-ruleset-zally/src/main/kotlin/org/zalando/zally/ruleset/zally/ZallyRuleSet.kt +++ b/server/zally-ruleset-zally/src/main/kotlin/org/zalando/zally/ruleset/zally/ZallyRuleSet.kt @@ -5,7 +5,7 @@ import org.zalando.zally.rule.api.Rule import java.net.URI class ZallyRuleSet : AbstractRuleSet() { - override val url: URI = URI.create("https://github.com/zalando/zally/blob/master/server/rules.md") + override val url: URI = URI.create("https://github.com/schweizerischebundesbahnen/zally/blob/master/server/rules.md") override fun url(rule: Rule): URI { val heading = "${rule.id}: ${rule.title}" diff --git a/server/zally-server/src/main/resources/api/zally-api.yaml b/server/zally-server/src/main/resources/api/zally-api.yaml index 4a2d73155..80a29bfe6 100644 --- a/server/zally-server/src/main/resources/api/zally-api.yaml +++ b/server/zally-server/src/main/resources/api/zally-api.yaml @@ -37,8 +37,8 @@ paths: API Violations description: | The API Violations endpoint validates given Swagger Specification - against the rules defined in *Zalando* RESTful API Guidelines - (http://zalando.github.io/restful-api-guidelines/). + against the rules defined in *SBB's* RESTful API Principles + (https://schweizerischebundesbahnen.github.io/api-principles/). A successful response includes the list of violations grouped by the API Guidelines rules. diff --git a/server/zally-server/src/test/java/org/zalando/zally/apireview/RestApiTestConfiguration.kt b/server/zally-server/src/test/java/org/zalando/zally/apireview/RestApiTestConfiguration.kt index 7c5fe5246..8c8ee386e 100644 --- a/server/zally-server/src/test/java/org/zalando/zally/apireview/RestApiTestConfiguration.kt +++ b/server/zally-server/src/test/java/org/zalando/zally/apireview/RestApiTestConfiguration.kt @@ -34,7 +34,7 @@ class RestApiTestConfiguration { .contains( "https://zally.example.com/TestRuleSet", "https://zalando.github.io/restful-api-guidelines/", - "https://github.com/zalando/zally/blob/master/server/rules.md" + "https://github.com/schweizerischebundesbahnen/zally/blob/master/server/rules.md" ) } } diff --git a/web-ui/package.json b/web-ui/package.json index 415becd61..aeb4973bd 100644 --- a/web-ui/package.json +++ b/web-ui/package.json @@ -1,7 +1,7 @@ { "name": "@zalando/zally-web-ui", "version": "0.4.0", - "description": "Zally API Linter Web UI", + "description": "SBB's API Linter", "main": "src/server/index.js", "engines": { "node": ">=10" @@ -23,7 +23,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/zalando/zally.git" + "url": "git+https://github.com/schweizerischebundesbahnen/zally.git" }, "lint-staged": { "linters": { @@ -38,9 +38,10 @@ "keywords": ["API", "Linter", "Zally"], "license": "MIT", "bugs": { - "url": "https://github.com/zalando/zally/issues" + "url": "https://github.com/schweizerischebundesbahnen/zally/issues" }, - "homepage": "https://github.com/zalando/zally/web-ui#readme", + "homepage": + "https://github.com/schweizerischebundesbahnen/zally/web-ui#readme", "dependencies": { "aurelia-fetch-client": "1.1.3", "compression": "1.7.1", diff --git a/web-ui/src/client/app/components/rules.jsx b/web-ui/src/client/app/components/rules.jsx index f9a1d9b64..c6e4e411a 100644 --- a/web-ui/src/client/app/components/rules.jsx +++ b/web-ui/src/client/app/components/rules.jsx @@ -8,7 +8,7 @@ export function RulesTab({ rules, error }) {
{error ? : null} -
    +
      {rules.map((rule, index) => { return ; })} diff --git a/web-ui/src/client/app/components/violations.jsx b/web-ui/src/client/app/components/violations.jsx index 794c51ccb..43c4379f1 100644 --- a/web-ui/src/client/app/components/violations.jsx +++ b/web-ui/src/client/app/components/violations.jsx @@ -24,7 +24,7 @@ export function Violations(props) {
      -
        +
          {props.violations.map((violation, index) => { return ; })} diff --git a/web-ui/src/client/app/containers/app.jsx b/web-ui/src/client/app/containers/app.jsx index c81322d2d..b594b1be7 100644 --- a/web-ui/src/client/app/containers/app.jsx +++ b/web-ui/src/client/app/containers/app.jsx @@ -30,12 +30,11 @@ export function App(props) { className="main-navigation-bar__logo" src={MOUNTPATH + 'assets/logo.png'} /> - API Linter + SBB's API Linter + {' '} + + {' '} - - an UI instance of the{' '} - - 'Zally' open source project - {OAUTH_ENABLED === true ? ( Github Project {' '} - - Copyright ZALANDO SE {new Date().getFullYear()} + - An SBB customised fork of Zaland's awesome{' '} + + Zally + + {', '} + which is open sourced under{' '} + + ZALANDO's License + {' '}
      ); diff --git a/web-ui/src/client/app/containers/violations-tab.jsx b/web-ui/src/client/app/containers/violations-tab.jsx index 8c79c0543..ce848b063 100644 --- a/web-ui/src/client/app/containers/violations-tab.jsx +++ b/web-ui/src/client/app/containers/violations-tab.jsx @@ -31,11 +31,11 @@ export function ViolationsTab({ {' '} conforms to  - Zalando's REST API Guidelines + SBB's REST API Principles diff --git a/web-ui/src/client/app/index.scss b/web-ui/src/client/app/index.scss index 2de4069a8..1676a1695 100644 --- a/web-ui/src/client/app/index.scss +++ b/web-ui/src/client/app/index.scss @@ -20,6 +20,9 @@ footer { padding: 1.2rem; font-size: 1.2rem; text-align: center; + border-bottom: 1px solid $dc-gray60; + background: $dc-gray80; + box-shadow: 1px 0 4px rgba(0, 0, 0, 0.2); } /** @@ -42,7 +45,7 @@ footer { } .main-navigation-bar__logo { - display: inline-block; + position: relative; float: left; width: 55px; margin-right: 8px; @@ -60,6 +63,17 @@ footer { } } +/* + * SBB Logo + */ +.sbb-logo { + position: relative; + float: right; + width: 187px; + margin-right: 8px; + margin-top: 12px; +} + /* * userinfo */ @@ -100,7 +114,7 @@ footer { * tabs */ .tab-contents { - background: $dc-gray80; + background: $dc-white; padding: 1.8rem 1.2rem; height: 100%; position: relative; @@ -209,4 +223,3 @@ footer { height: 80%; } } - diff --git a/web-ui/src/client/public/assets/SBB.svg b/web-ui/src/client/public/assets/SBB.svg new file mode 100644 index 000000000..acd09c8fe --- /dev/null +++ b/web-ui/src/client/public/assets/SBB.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/web-ui/src/client/public/assets/logo.png b/web-ui/src/client/public/assets/logo.png index f3c7e9ec9..ea9263ed9 100644 Binary files a/web-ui/src/client/public/assets/logo.png and b/web-ui/src/client/public/assets/logo.png differ diff --git a/web-ui/src/server/__tests__/integration.test.js b/web-ui/src/server/__tests__/integration.test.js index 94e9fcbe6..0364af999 100644 --- a/web-ui/src/server/__tests__/integration.test.js +++ b/web-ui/src/server/__tests__/integration.test.js @@ -12,7 +12,7 @@ describe('zally-web-ui standalone', () => { .expect(200) .expect('Content-Type', /html/) .then(res => { - expect(res.text).toMatch(/Zally API Linter WEB UI/); + expect(res.text).toMatch(/<title>SBB's API Linter/); expect(res.text).toMatch( /<script src="\/env.js" type="text\/javascript"><\/script>/ ); diff --git a/web-ui/src/server/index.js b/web-ui/src/server/index.js index 9f14d0796..d3a4e1535 100644 --- a/web-ui/src/server/index.js +++ b/web-ui/src/server/index.js @@ -14,7 +14,7 @@ const DEFAULT_OPTIONS = { ZALLY_API_URL: 'http://localhost:8000', }, env: { - HEAD_TITLE: 'Zally API Linter WEB UI', + HEAD_TITLE: "SBB's API Linter", }, logger: console, handlers: {