chore: added spectral to lint OpenAPI spec
This commit is contained in:
parent
73cba3f0d7
commit
ef7c6cb43a
10
.github/workflows/test.yaml
vendored
10
.github/workflows/test.yaml
vendored
@ -231,6 +231,16 @@ jobs:
|
||||
OLLAMA_SKIP_CPU_GENERATE: '1'
|
||||
# TODO - do we need any artifacts?
|
||||
|
||||
validate-openapi:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: stoplightio/spectral-action@latest
|
||||
with:
|
||||
file_glob: 'specs/*.yaml'
|
||||
|
||||
lint:
|
||||
strategy:
|
||||
matrix:
|
||||
|
1
.spectral.yaml
Normal file
1
.spectral.yaml
Normal file
@ -0,0 +1 @@
|
||||
extends: ["spectral:oas", "spectral:asyncapi"]
|
@ -3,6 +3,9 @@ info:
|
||||
title: Ollama API
|
||||
description: API for interacting with the Ollama service.
|
||||
version: 0.1.44
|
||||
contact:
|
||||
name: Ollama
|
||||
url: https://github.com/ollama/ollama
|
||||
servers:
|
||||
- url: http://{host}:{port}
|
||||
description: Ollama API server
|
||||
@ -337,22 +340,18 @@ components:
|
||||
items:
|
||||
type: string
|
||||
format: byte
|
||||
description: A list of base64-encoded images (for multimodal models such as llava)
|
||||
example: null
|
||||
description: A list of base64-encoded images (for multimodal models such as llava)
|
||||
format:
|
||||
type: string
|
||||
description: The format to return a response in. Currently the only accepted value is json
|
||||
example: null
|
||||
options:
|
||||
$ref: '#/components/schemas/Options'
|
||||
system:
|
||||
type: string
|
||||
description: System message to (overrides what is defined in the Modelfile)
|
||||
example: null
|
||||
template:
|
||||
type: string
|
||||
description: The prompt template to use (overrides what is defined in the Modelfile)
|
||||
example: null
|
||||
context:
|
||||
type: array
|
||||
items:
|
||||
|
Loading…
x
Reference in New Issue
Block a user