Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weitere API-Endpunkte #25

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Weitere API-Endpunkte #25

wants to merge 7 commits into from

Conversation

mvglasow
Copy link

Wie in #20 beschrieben, außerdem /parking für Pkw-Rastplätze (/parking_lorry ist auf Rastplätze mit Lkw-Stellplätzen beschränkt).

Hierzu musste /autobahn aus der Basis-URL in die bereits dokumentierten URLs verschoben werden.

Syntaxprüfung habe ich keine durchgeführt – wenn etwas nicht passt, bitte melden.

mvglasow added 3 commits March 16, 2023 22:01
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Signed-off-by: mvglasow <michael -at- vonglasow.com>
@wirthual
Copy link
Member

Hi,
danke dir fuer den Merge Request.

Da haben sich ein paar copy and paste fehler eingeschlichen glaube ich. Wenn roadId in der beschreibung unter path ist, dann muss es auch im path als {roadId} zu finden sein.

Kannst du versuchen deine version in den editor unter https://editor.swagger.io/ einzufuegen, dann solltest du die Fehler sehen.

image

Signed-off-by: mvglasow <michael -at- vonglasow.com>
@mvglasow
Copy link
Author

Danke für den Link, jetzt sollte alles passen.

@t-huyeng t-huyeng mentioned this pull request Mar 21, 2023
openapi.yaml Outdated Show resolved Hide resolved
Signed-off-by: mvglasow <michael -at- vonglasow.com>
@mvglasow
Copy link
Author

Done.

openapi.yaml Outdated
road:
$ref: '#/components/schemas/RoadId'
counter:
type: number
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, just run the openapi check again locally, and this either needs to be a string' not a number' or line 496 needs to be changed.

 496:20    error  oas3-valid-schema-example  "counter" property type must be number       components.schemas.RoadCounter.example.counter

You can run the spectral lint by yourself if you have docker installed with
docker run --rm -it -v $(pwd):/tmp stoplight/spectral lint --ruleset "/tmp/.spectral.yaml" "/tmp/openapi.yaml"

@t-huyeng
Copy link
Member

If the small error in line 496 is fixed, I think we can merge.
@wirthual, I guess it will change some of the python code. So I think we need a new release of the python package (update version in generator_config.yaml) after the merge?

@wirthual
Copy link
Member

Yes, thats correct 👍

Signed-off-by: mvglasow <michael -at- vonglasow.com>
@mvglasow
Copy link
Author

Line 496 is correct, the API does in fact return a string representation of the number. This is similar to other (already documented) cases where Boolean values are passed as strings, not Boolean values.

Signed-off-by: mvglasow <michael -at- vonglasow.com>
@mvglasow
Copy link
Author

Should be OK now, except for the server not reporting the expected content type – but that doesn’t look like any of my changes introduced it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants