Skip to content

Commit

Permalink
Merge pull request #8 from fabiante/feat/api-linting
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiante authored Sep 1, 2023
2 parents 16ecac8 + 7534f83 commit 44e8e1b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ on:
branches: [ "master" ]

jobs:
build:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Lint
- name: Lint Code
run: go vet -v ./...
- name: Lint API Spec
run: npx @redocly/cli lint api/openapi.yml
- name: Test
run: go test -v ./...
- name: Build
Expand Down
4 changes: 4 additions & 0 deletions api/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ info:
title: PersURL
description: Application to manage and resolve [PURL](https://en.wikipedia.org/wiki/Persistent_uniform_resource_locator) links.
version: v1
license:
name: MIT

servers:
- url: "http://localhost"
Expand All @@ -13,6 +15,8 @@ tags:
- name: Admin
description: Manage PURLs

security: []

paths:
/r/{domain}/{name}:
get:
Expand Down
8 changes: 8 additions & 0 deletions redocly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends:
- recommended

rules:
# Service is designed to sometimes respond only with 3xx and 4xx responses.
operation-2xx-response: off
# It should be enough to state the license name. The git repository is the source of truth here.
info-license-url: off

0 comments on commit 44e8e1b

Please sign in to comment.