Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/samples-crystal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Samples Crystal clients

on:
push:
paths:
- samples/client/petstore/crystal/**
pull_request:
paths:
- samples/client/petstore/crystal/**
jobs:
build:
name: Build Crystal projects
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/petstore/crystal/
services:
petstore-api:
image: swaggerapi/petstore
ports:
- 80:8080
env:
SWAGGER_HOST: http://petstore.swagger.io
SWAGGER_BASE_PATH: /v2
steps:
- uses: actions/checkout@v5
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
- name: Shards Install
run: shards install
working-directory: ${{ matrix.sample }}
- name: Run tests
run: crystal spec
working-directory: ${{ matrix.sample }}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.0.0
servers:
- url: 'http://petstore.swagger.io/v2'
- url: 'http://localhost/v2'
info:
description: >-
This is a sample server Petstore server. For this sample, you can use the api key
Expand Down Expand Up @@ -636,7 +636,7 @@ components:
type: oauth2
flows:
implicit:
authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'
authorizationUrl: 'http://localhost/api/oauth/dialog'
scopes:
'write:pets': modify pets in your account
'read:pets': read your pets
Expand Down
2 changes: 2 additions & 0 deletions samples/client/petstore/crystal/.openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
#
#
4 changes: 2 additions & 2 deletions samples/client/petstore/crystal/src/petstore/configuration.cr
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ module Petstore
# Create a new `Configuration`.
def initialize
@scheme = "http"
@host = "petstore.swagger.io"
@host = "localhost"
@base_path = "/v2"
@server_index = 0
@server_operation_index = {} of Symbol => String
Expand Down Expand Up @@ -237,7 +237,7 @@ module Petstore
def server_settings
[
{
url: "http://petstore.swagger.io/v2",
url: "http://localhost/v2",
description: "No description provided",
}
]
Expand Down
Loading