When spec instrumentation is enabled, and bootstrapping a martian using an OpenAPI v3 definition containing no content-type declaration for the request (for example a GET), then spec validation fails for example:
Definition with no content-type declaration for the request:
openapi: 3.0.0
info:
title: OpenAI API
description: APIs for sampling from and fine-tuning language models
version: '1.3.0'
servers:
- url: https://api.openai.com/v1
paths:
/models:
get:
operationId: listModels
summary: Lists the currently available models
responses:
"200":
description: OK
content:
application/json:
schema: {}
Ref: Originating issue
When spec instrumentation is enabled, and bootstrapping a martian using an OpenAPI v3 definition containing no content-type declaration for the request (for example a GET), then spec validation fails for example:
Definition with no content-type declaration for the request:
In a test namespace, enable spec instrumentation:
results in validation error:
This PR fixes it by ensuring
nil
for:consumes
in this case instead of[nil]