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

Controller refactoring #1033

Merged
merged 39 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
16b8bdc
experiment: use openapi files to handle both docs and validators
marcocastignoli May 10, 2023
fef38a8
example of /verify doc and validation using express-openapi-validator…
marcocastignoli May 11, 2023
48814ae
controller refactoring
marcocastignoli May 15, 2023
9c4d5a8
handle alternative routes paths with redirects
marcocastignoli May 15, 2023
3e8451b
refactoring of solc-json stateless
marcocastignoli May 16, 2023
73b924f
refactor solc-json session apis
marcocastignoli May 16, 2023
ce46e34
refactor session state routes
marcocastignoli May 16, 2023
7f288b9
refactor create2 verification
marcocastignoli May 16, 2023
0b21cce
refactor etherscan routes
marcocastignoli May 16, 2023
220746d
add missing clientToken to create2 routes
marcocastignoli May 16, 2023
2a2d145
refactor testartifacts routes
marcocastignoli May 16, 2023
13dc353
fix wrong safeHandler import
marcocastignoli May 16, 2023
4ff4d5e
refactoring repository routes
marcocastignoli May 17, 2023
8460e12
* move services in a separate global object
marcocastignoli May 18, 2023
4ebcb38
add all repository openapi declarations
marcocastignoli May 18, 2023
961b393
remove RepositoryController and BaseController classes
marcocastignoli May 18, 2023
2045f5f
add Repository tag to all repository apis in openapi
marcocastignoli May 18, 2023
87611b1
extract check-by apis parameters from query
marcocastignoli May 18, 2023
bf9ccb0
fix most of tests after refactoring
marcocastignoli May 30, 2023
780a26e
tests running in refactoring
marcocastignoli May 31, 2023
7d65ba5
refactoring: handle all deprecated routes
marcocastignoli May 31, 2023
1f11753
fix handling of deprecated routes
marcocastignoli May 31, 2023
b5ee7a9
fix linting errors after refactoring
marcocastignoli May 31, 2023
1d970ca
fix import MAX_SESSION_SIZE in server tests
marcocastignoli May 31, 2023
9516d26
fix etherscan tests
marcocastignoli May 31, 2023
ecd13b4
disable test's ipfs gateway
marcocastignoli May 31, 2023
924cdba
add missing /session/input-files openapi spec
marcocastignoli Jun 1, 2023
bc14931
add all the responses to the openapi specs
marcocastignoli Jun 1, 2023
82d490d
validate chainsIds in checkbyaddresses
marcocastignoli Jun 1, 2023
b2f2df9
Update check-all-by-addresses API doc
kuzdogan Jun 6, 2023
e0cfa7d
Change serDes to format validation (#1052)
kuzdogan Jun 7, 2023
fb9f36d
Session/Stateless to Session/StatelessVerification
kuzdogan Jun 12, 2023
d94989f
remove non existent immutableVariableVerificationUnsupported
marcocastignoli Jun 13, 2023
c36daa6
Merge branch 'staging' into controller-refactoring
marcocastignoli Jun 14, 2023
2114fd0
add npm install in build:clean before using lerna
marcocastignoli Jun 14, 2023
28b03d7
change the variable name `reportStatus` to `reportMatchStatus` so it'…
marcocastignoli Jun 15, 2023
94671dd
Customize API favicon title
kuzdogan Jun 15, 2023
1bdd368
responses components included from a shared file
marcocastignoli Jun 19, 2023
8acd9a5
examples for all stateless api
marcocastignoli Jun 20, 2023
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ logs
**/too_big.txt
chain-tests-report/
.nyc_output
coverage
coverage
!src/server/controllers/repository
marcocastignoli marked this conversation as resolved.
Show resolved Hide resolved
58 changes: 58 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
openapi: "3.0.0"
info:
version: 1.0.0
title: Sourcify API
description: API to interact with Sourcify
license:
name: MIT
url: https://github.com/ethereum/sourcify/blob/master/LICENSE
servers:
- url: https://sourcify.dev/server
description: Production server
- url: https://staging.sourcify.dev/server
description: Staging server
- url: http://localhost:5555
description: Local development server address on default port 5555.
paths:
/session/data:
$ref: "src/server/controllers/verification/session-state/data.session-state.paths.yaml#/paths/~1session~1data"
kuzdogan marked this conversation as resolved.
Show resolved Hide resolved
/session/clear:
$ref: "src/server/controllers/verification/session-state/clear.session-state.paths.yaml#/paths/~1session~1clear"
/session/input-files:
$ref: "src/server/controllers/verification/session-state/input-files.session-state.paths.yaml#/paths/~1session~1input-files"
/session/input-contract:
$ref: "src/server/controllers/verification/session-state/input-contract.session-state.paths.yaml#/paths/~1session~1input-contract"
/verify:
$ref: "src/server/controllers/verification/verify/stateless/verify.stateless.paths.yaml#/paths/~1verify"
/session/verify-checked:
$ref: "src/server/controllers/verification/verify/session/verify.session.paths.yaml#/paths/~1session~1verify-checked"
/verify/solc-json:
$ref: "src/server/controllers/verification/solc-json/stateless/solc-json.stateless.paths.yaml#/paths/~1verify~1solc-json"
/session/input-solc-json:
$ref: "src/server/controllers/verification/solc-json/session/solc-json.session.paths.yaml#/paths/~1session~1input-solc-json"
/verify/create2:
$ref: "src/server/controllers/verification/create2/stateless/create2.stateless.paths.yaml#/paths/~1verify~1create2"
/session/verify/create2:
$ref: "src/server/controllers/verification/create2/session/create2.session.paths.yaml#/paths/~1session~1verify~1create2"
/session/verify/create2/compile:
$ref: "src/server/controllers/verification/create2/session/compile.create2.session.paths.yaml#/paths/~1session~1verify~1create2~1compile"
/verify/etherscan:
$ref: "src/server/controllers/verification/etherscan/stateless/etherscan.stateless.paths.yaml#/paths/~1verify~1etherscan"
/session/verify/etherscan:
$ref: "src/server/controllers/verification/etherscan/session/etherscan.session.paths.yaml#/paths/~1session~1verify~1etherscan"
/check-all-by-addresses:
$ref: "src/server/controllers/repository/check-all-by-addresses.stateless.paths.yaml#/paths/~1check-all-by-addresses"
/check-by-addresses:
$ref: "src/server/controllers/repository/check-by-addresses.stateless.paths.yaml#/paths/~1check-by-addresses"
/files/contracts/{chain}:
$ref: "src/server/controllers/repository/get-contract-addresses-all.stateless.paths.yaml#/paths/~1files~1contracts~1{chain}"
/contracts/{full_match | partial_match}/{chain}/{address}/{filePath}:
$ref: "src/server/controllers/repository/get-file-static.stateless.paths.yaml#/paths/~1contracts~1{full_match | partial_match}~1{chain}~1{address}~1{filePath}"
/files/tree/any/{chain}/{address}:
$ref: "src/server/controllers/repository/get-file-tree-all.stateless.paths.yaml#/paths/~1files~1tree~1any~1{chain}~1{address}"
/files/tree/{chain}/{address}:
$ref: "src/server/controllers/repository/get-file-tree-full.stateless.paths.yaml#/paths/~1files~1tree~1{chain}~1{address}"
/files/any/{chain}/{address}:
$ref: "src/server/controllers/repository/get-source-files-all.stateless.paths.yaml#/paths/~1files~1any~1{chain}~1{address}"
/files/{chain}/{address}:
$ref: "src/server/controllers/repository/get-source-files-full.stateless.paths.yaml#/paths/~1files~1{chain}~1{address}"
Loading