OpenBankProject / OpenBankProject/OBP-API

404 response codes are being returned but not defined in the spec

Open
#698 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.7k
Forks
482
Avg merge
1d 12h
Merged PRs (30d)
15

Description

Spec definition issue
All expected response codes should be defined in the OAS as follows:

'The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors.'

Example:
404 response codes are being returned but not defined in the spec

{
	"httpMethod": "POST",
	"url": "http://apisandbox.openbankproject.com/obp/v3.0.0/banks/nordea/accounts/nordea-test-160273",
	"apiRequestParameters": [{
			"paramIn": "body",
			"parameterName": "body",
			"parameterValue": "Enter_value_here",
			"required": true
		}, {
			"paramIn": "path",
			"parameterName": "ACCOUNT_ID",
			"parameterValue": "nordea-test-160273",
			"required": true
		}, {
			"paramIn": "path",
			"parameterName": "BANK_ID",
			"parameterValue": "nordea",
			"required": true
		}
	],
	"apiRequestResponses": [{
			"responseCode": "400"
		}
	],
	"authorization": {
		"locatedIn": "Header",
		"authKey": "Authorization",
		"authValue": "DirectLogin token=\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyIiOiIifQ.tQDG3T1wOpEtQYultU8U6iyPWx2mBV2UM3SAOHpaRjo\""
	},
	"apiRequestResult": {
		"statusCode": "404",
		"body": "<!DOCTYPE html>\n<html> <body>The Requested URL /obp/v3.0.0/banks/nordea/accounts/nordea-test-160273 was not found on this server</body> </html>  \n  ",
		"assertedResult": 5
	}
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the OpenAPI definition for the POST endpoint shown in the example and compare its declared responses with the observed 404 response. Update the specification to document the successful response and known error responses, then verify that the documented codes match the endpoint behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, scala
Domain
api, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.