diff --git a/fern/pages/changelogs/cli/2024-10-22.mdx b/fern/pages/changelogs/cli/2024-10-22.mdx new file mode 100644 index 00000000000..39df85e1fc0 --- /dev/null +++ b/fern/pages/changelogs/cli/2024-10-22.mdx @@ -0,0 +1,4 @@ +## 0.45.0-rc15 +**`(fix):`** The Conjure importer now correctly imports base-path and docs from your conjure definition. + + diff --git a/packages/cli/api-importers/commons/src/FernDefnitionBuilder.ts b/packages/cli/api-importers/commons/src/FernDefnitionBuilder.ts index 2a7c9db7ecb..7321b382011 100644 --- a/packages/cli/api-importers/commons/src/FernDefnitionBuilder.ts +++ b/packages/cli/api-importers/commons/src/FernDefnitionBuilder.ts @@ -5,6 +5,10 @@ import { camelCase, isEqual } from "lodash-es"; import path, { basename, extname } from "path"; import { FernDefinitionDirectory } from "./utils/FernDefinitionDirectory"; +export type HttpServiceInfo = Partial< + Pick & { docs?: string } +>; + export interface FernDefinitionBuilder { setDisplayName({ displayName }: { displayName: string }): void; @@ -84,7 +88,10 @@ export interface FernDefinitionBuilder { addChannelExample(file: RelativeFilePath, { example }: { example: RawSchemas.ExampleWebSocketSession }): void; - setServiceInfo(file: RelativeFilePath, { displayName, docs }: { displayName?: string; docs?: string }): void; + setServiceInfo( + file: RelativeFilePath, + { auth, "base-path": basePath, "display-name": displayName, docs }: HttpServiceInfo + ): void; addTypeExample(file: RelativeFilePath, name: string, convertedExample: RawSchemas.ExampleTypeSchema): void; @@ -125,16 +132,23 @@ export class FernDefinitionBuilderImpl implements FernDefinitionBuilder { public setServiceInfo( file: RelativeFilePath, - { displayName, docs }: { displayName?: string | undefined; docs?: string | undefined } + { auth, "base-path": basePath, "display-name": displayName, docs }: HttpServiceInfo ): void { const fernFile = this.getOrCreateFile(file); if (fernFile.service == null) { + // Set to default values if service is null fernFile.service = { auth: false, "base-path": "", endpoints: {} }; } + if (auth != null) { + fernFile.service.auth = auth; + } + if (basePath != null) { + fernFile.service["base-path"] = basePath; + } if (displayName != null) { fernFile.service["display-name"] = displayName; } diff --git a/packages/cli/api-importers/commons/src/index.ts b/packages/cli/api-importers/commons/src/index.ts index f442f3acb69..1a2d852c5ed 100644 --- a/packages/cli/api-importers/commons/src/index.ts +++ b/packages/cli/api-importers/commons/src/index.ts @@ -1,2 +1,7 @@ export { APIDefinitionImporter } from "./APIDefinitionImporter"; -export { type FernDefinitionBuilder, FernDefinitionBuilderImpl, type FernDefinition } from "./FernDefnitionBuilder"; +export { + type FernDefinitionBuilder, + FernDefinitionBuilderImpl, + type FernDefinition, + type HttpServiceInfo +} from "./FernDefnitionBuilder"; diff --git a/packages/cli/api-importers/conjure/conjure-to-fern-tests/__test__/__snapshots__/trace.json b/packages/cli/api-importers/conjure/conjure-to-fern-tests/__test__/__snapshots__/trace.json index ebfc8a82dbe..65e102d7ad4 100644 --- a/packages/cli/api-importers/conjure/conjure-to-fern-tests/__test__/__snapshots__/trace.json +++ b/packages/cli/api-importers/conjure/conjure-to-fern-tests/__test__/__snapshots__/trace.json @@ -12,29 +12,11 @@ "namedDefinitionFiles": { "Admin/__package__.yml": { "absoluteFilepath": "/DUMMY_PATH", - "rawContents": "types:\n StoreTracedTestCaseRequest:\n properties:\n result: submission.TestCaseResultWithStdout\n traceResponses: list\n StoreTracedWorkspaceRequest:\n properties:\n workspaceRunDetails: submission.WorkspaceRunDetails\n traceResponses: list\nimports:\n submission: ../ExecutionSesssionManagement/__package__.yml\n problemV2: ../ProblemInfoServicV2/__package__.yml\nservice:\n auth: false\n base-path: ''\n endpoints:\n updateTestSubmissionStatus:\n auth: true\n path: /store-test-submission-status/{submissionId}\n method: POST\n path-parameters:\n submissionId: submission.SubmissionId\n request:\n body:\n type: submission.TestSubmissionStatus\n sendTestSubmissionUpdate:\n auth: true\n path: /store-test-submission-status-v2/{submissionId}\n method: POST\n path-parameters:\n submissionId: submission.SubmissionId\n request:\n body:\n type: submission.TestSubmissionUpdate\n updateWorkspaceSubmissionStatus:\n auth: true\n path: /store-workspace-submission-status/{submissionId}\n method: POST\n path-parameters:\n submissionId: submission.SubmissionId\n request:\n body:\n type: submission.WorkspaceSubmissionStatus\n sendWorkspaceSubmissionUpdate:\n auth: true\n path: /store-workspace-submission-status-v2/{submissionId}\n method: POST\n path-parameters:\n submissionId: submission.SubmissionId\n request:\n body:\n type: submission.WorkspaceSubmissionUpdate\n storeTracedTestCase:\n auth: true\n path: /store-test-trace/submission/{submissionId}/testCase/{testCaseId}\n method: POST\n path-parameters:\n submissionId: submission.SubmissionId\n testCaseId: string\n request:\n body:\n type: StoreTracedTestCaseRequest\n storeTracedTestCaseV2:\n auth: true\n path: /store-test-trace-v2/submission/{submissionId}/testCase/{testCaseId}\n method: POST\n path-parameters:\n submissionId: submission.SubmissionId\n testCaseId: problemV2.TestCaseId\n request:\n body:\n type: list\n storeTracedWorkspace:\n auth: true\n path: /store-workspace-trace/submission/{submissionId}\n method: POST\n path-parameters:\n submissionId: submission.SubmissionId\n request:\n body:\n type: StoreTracedWorkspaceRequest\n storeTracedWorkspaceV2:\n auth: true\n path: /store-workspace-trace-v2/submission/{submissionId}\n method: POST\n path-parameters:\n submissionId: submission.SubmissionId\n request:\n body:\n type: list\n", + "rawContents": "service:\n auth: false\n base-path: /admin\n endpoints:\n updateTestSubmissionStatus:\n auth: true\n path: /store-test-submission-status/{submissionId}\n method: POST\n path-parameters:\n submissionId: submission.SubmissionId\n request:\n body:\n type: submission.TestSubmissionStatus\n sendTestSubmissionUpdate:\n auth: true\n path: /store-test-submission-status-v2/{submissionId}\n method: POST\n path-parameters:\n submissionId: submission.SubmissionId\n request:\n body:\n type: submission.TestSubmissionUpdate\n updateWorkspaceSubmissionStatus:\n auth: true\n path: /store-workspace-submission-status/{submissionId}\n method: POST\n path-parameters:\n submissionId: submission.SubmissionId\n request:\n body:\n type: submission.WorkspaceSubmissionStatus\n sendWorkspaceSubmissionUpdate:\n auth: true\n path: /store-workspace-submission-status-v2/{submissionId}\n method: POST\n path-parameters:\n submissionId: submission.SubmissionId\n request:\n body:\n type: submission.WorkspaceSubmissionUpdate\n storeTracedTestCase:\n auth: true\n path: /store-test-trace/submission/{submissionId}/testCase/{testCaseId}\n method: POST\n path-parameters:\n submissionId: submission.SubmissionId\n testCaseId: string\n request:\n body:\n type: StoreTracedTestCaseRequest\n storeTracedTestCaseV2:\n auth: true\n path: /store-test-trace-v2/submission/{submissionId}/testCase/{testCaseId}\n method: POST\n path-parameters:\n submissionId: submission.SubmissionId\n testCaseId: problemV2.TestCaseId\n request:\n body:\n type: list\n storeTracedWorkspace:\n auth: true\n path: /store-workspace-trace/submission/{submissionId}\n method: POST\n path-parameters:\n submissionId: submission.SubmissionId\n request:\n body:\n type: StoreTracedWorkspaceRequest\n storeTracedWorkspaceV2:\n auth: true\n path: /store-workspace-trace-v2/submission/{submissionId}\n method: POST\n path-parameters:\n submissionId: submission.SubmissionId\n request:\n body:\n type: list\ntypes:\n StoreTracedTestCaseRequest:\n properties:\n result: submission.TestCaseResultWithStdout\n traceResponses: list\n StoreTracedWorkspaceRequest:\n properties:\n workspaceRunDetails: submission.WorkspaceRunDetails\n traceResponses: list\nimports:\n submission: ../ExecutionSesssionManagement/__package__.yml\n problemV2: ../ProblemInfoServicV2/__package__.yml\n", "contents": { - "types": { - "StoreTracedTestCaseRequest": { - "properties": { - "result": "submission.TestCaseResultWithStdout", - "traceResponses": "list" - } - }, - "StoreTracedWorkspaceRequest": { - "properties": { - "workspaceRunDetails": "submission.WorkspaceRunDetails", - "traceResponses": "list" - } - } - }, - "imports": { - "submission": "../ExecutionSesssionManagement/__package__.yml", - "problemV2": "../ProblemInfoServicV2/__package__.yml" - }, "service": { "auth": false, - "base-path": "", + "base-path": "/admin", "endpoints": { "updateTestSubmissionStatus": { "auth": true, @@ -143,13 +125,69 @@ } } } + }, + "types": { + "StoreTracedTestCaseRequest": { + "properties": { + "result": "submission.TestCaseResultWithStdout", + "traceResponses": "list" + } + }, + "StoreTracedWorkspaceRequest": { + "properties": { + "workspaceRunDetails": "submission.WorkspaceRunDetails", + "traceResponses": "list" + } + } + }, + "imports": { + "submission": "../ExecutionSesssionManagement/__package__.yml", + "problemV2": "../ProblemInfoServicV2/__package__.yml" } } }, "ExecutionSesssionManagement/__package__.yml": { "absoluteFilepath": "/DUMMY_PATH", - "rawContents": "types:\n SubmissionId:\n type: string\n ShareId:\n type: string\n SubmissionRequest:\n union:\n initializeProblemRequest: InitializeProblemRequest\n initializeWorkspaceRequest: commons.EmptyObject\n submitV2: SubmitRequestV2\n workspaceSubmit: WorkspaceSubmitRequest\n stop: StopRequest\n InitializeProblemRequest:\n properties:\n problemId: commons.ProblemId\n problemVersion: optional\n SubmitRequestV2:\n properties:\n submissionId: SubmissionId\n language: commons.Language\n submissionFiles: list\n problemId: commons.ProblemId\n problemVersion: optional\n userId: optional\n WorkspaceSubmitRequest:\n properties:\n submissionId: SubmissionId\n language: commons.Language\n submissionFiles: list\n userId: optional\n SubmissionFileInfo:\n properties:\n directory: string\n filename: string\n contents: string\n SubmissionTypeEnum:\n enum:\n - TEST\n StopRequest:\n properties:\n submissionId: SubmissionId\n SubmissionResponse:\n union:\n serverInitialized: commons.EmptyObject\n problemInitialized: commons.ProblemId\n workspaceInitialized: commons.EmptyObject\n serverErrored: ExceptionInfo\n codeExecutionUpdate: CodeExecutionUpdate\n terminated: TerminatedResponse\n CodeExecutionUpdate:\n union:\n buildingExecutor:\n type: BuildingExecutorResponse\n docs: >-\n Statuses if an executor for the session isn't ready (Before\n RunningResponse).\n running:\n type: RunningResponse\n docs: Sent once a test submission is executing.\n errored:\n type: ErroredResponse\n docs: Sent if a submission cannot be run (i.e. Compile Error).\n stopped:\n type: StoppedResponse\n docs: Sent if a submission is stopped.\n graded:\n type: GradedResponse\n docs: Graded testcases without trace information.\n gradedV2:\n type: GradedResponseV2\n docs: Graded submission for v2 problems.\n workspaceRan:\n type: WorkspaceRanResponse\n docs: Workspace run without trace information.\n recording:\n type: RecordingResponseNotification\n docs: Gives progress about what is being recorded.\n recorded:\n type: RecordedResponseNotification\n docs: Graded testcases with trace information.\n invalidRequest:\n type: InvalidRequestResponse\n docs: Sent if an invalid request is sent for a submission.\n finished:\n type: FinishedResponse\n docs: Sent once a submission is graded and fully recorded.\n BuildingExecutorResponse:\n properties:\n submissionId: SubmissionId\n status: ExecutionSessionStatus\n RunningResponse:\n properties:\n submissionId: SubmissionId\n state: RunningSubmissionState\n RunningSubmissionState:\n enum:\n - QUEUEING_SUBMISSION\n - KILLING_HISTORICAL_SUBMISSIONS\n - WRITING_SUBMISSION_TO_FILE\n - COMPILING_SUBMISSION\n - RUNNING_SUBMISSION\n ErroredResponse:\n properties:\n submissionId: SubmissionId\n errorInfo: ErrorInfo\n ErrorInfo:\n union:\n compileError: CompileError\n runtimeError:\n type: RuntimeError\n docs: >\n If the submission cannot be executed and throws a runtime error before\n getting to any of the testcases.\n internalError:\n type: InternalError\n docs: |\n If the trace backend encounters an unexpected error.\n CompileError:\n properties:\n message: string\n RuntimeError:\n properties:\n message: string\n InternalError:\n properties:\n exceptionInfo: ExceptionInfo\n StoppedResponse:\n properties:\n submissionId: SubmissionId\n WorkspaceRanResponse:\n properties:\n submissionId: SubmissionId\n runDetails: WorkspaceRunDetails\n WorkspaceRunDetails:\n properties:\n exceptionV2: optional\n exception: optional\n stdout: string\n GradedResponse:\n properties:\n submissionId: SubmissionId\n testCases: map\n GradedResponseV2:\n properties:\n submissionId: SubmissionId\n testCases: map\n TestCaseGrade:\n union:\n hidden: TestCaseHiddenGrade\n nonHidden: TestCaseNonHiddenGrade\n TestCaseHiddenGrade:\n properties:\n passed: boolean\n TestCaseNonHiddenGrade:\n properties:\n passed: boolean\n actualResult: optional\n exception: optional\n stdout: string\n RecordedResponseNotification:\n properties:\n submissionId: SubmissionId\n traceResponsesSize: integer\n testCaseId: optional\n RecordingResponseNotification:\n properties:\n submissionId: SubmissionId\n testCaseId: optional\n lineNumber: integer\n lightweightStackInfo: LightweightStackframeInformation\n tracedFile: optional\n LightweightStackframeInformation:\n properties:\n numStackFrames: integer\n topStackFrameMethodName: string\n TestCaseResultWithStdout:\n properties:\n result: TestCaseResult\n stdout: string\n TestCaseResult:\n properties:\n expectedResult: commons.VariableValue\n actualResult: ActualResult\n passed: boolean\n ActualResult:\n union:\n value: commons.VariableValue\n exception: ExceptionInfo\n exceptionV2: ExceptionV2\n ExceptionV2:\n union:\n generic: ExceptionInfo\n timeout: commons.EmptyObject\n ExceptionInfo:\n properties:\n exceptionType: string\n exceptionMessage: string\n exceptionStacktrace: string\n InvalidRequestResponse:\n properties:\n request: SubmissionRequest\n cause: InvalidRequestCause\n InvalidRequestCause:\n union:\n submissionIdNotFound:\n type: SubmissionIdNotFound\n docs: The submission request references a submission id that doesn't exist.\n customTestCasesUnsupported:\n type: CustomTestCasesUnsupported\n unexpectedLanguage:\n type: UnexpectedLanguageError\n docs: The submission request was routed to an incorrect language executor.\n ExistingSubmissionExecuting:\n properties:\n submissionId: SubmissionId\n SubmissionIdNotFound:\n properties:\n missingSubmissionId: SubmissionId\n CustomTestCasesUnsupported:\n properties:\n problemId: commons.ProblemId\n submissionId: SubmissionId\n UnexpectedLanguageError:\n properties:\n expectedLanguage: commons.Language\n actualLanguage: commons.Language\n TerminatedResponse:\n properties: {}\n FinishedResponse:\n properties:\n submissionId: SubmissionId\n StdoutResponse:\n properties:\n submissionId: SubmissionId\n stdout: string\n StderrResponse:\n properties:\n submissionId: SubmissionId\n stderr: string\n TraceResponse:\n properties:\n submissionId: SubmissionId\n lineNumber: integer\n returnValue: optional\n expressionLocation: optional\n stack: StackInformation\n stdout: optional\n TraceResponseV2:\n properties:\n submissionId: SubmissionId\n lineNumber: integer\n file: TracedFile\n returnValue: optional\n expressionLocation: optional\n stack: StackInformation\n stdout: optional\n TracedFile:\n properties:\n filename: string\n directory: string\n ExpressionLocation:\n properties:\n start: integer\n offset: integer\n StackInformation:\n properties:\n numStackFrames: integer\n topStackFrame: optional\n StackFrame:\n properties:\n methodName: string\n lineNumber: integer\n scopes: list\n Scope:\n properties:\n variables: map\n ExecutionSessionResponse:\n properties:\n sessionId: string\n executionSessionUrl: optional\n language: commons.Language\n status: ExecutionSessionStatus\n ExecutionSessionStatus:\n enum:\n - CREATING_CONTAINER\n - PROVISIONING_CONTAINER\n - PENDING_CONTAINER\n - RUNNING_CONTAINER\n - LIVE_CONTAINER\n - FAILED_TO_LAUNCH\n SubmissionStateV2:\n properties:\n timeSubmitted: datetime\n language: commons.Language\n submissionFiles: list\n submissionStatus: SubmissionStatusV2\n SubmissionStatusV2:\n union:\n test: TestSubmissionStatusV2\n workspace: WorkspaceSubmissionStatusV2\n TestSubmissionStatusV2:\n properties:\n updates: list\n problemId: commons.ProblemId\n problemVersion: integer\n problemInfo: problemV2.ProblemInfoV2\n WorkspaceSubmissionStatusV2:\n properties:\n updates: list\n TestSubmissionUpdate:\n properties:\n updateTime: datetime\n updateInfo: TestSubmissionUpdateInfo\n TestSubmissionUpdateInfo:\n union:\n running: RunningSubmissionState\n stopped: commons.EmptyObject\n errored: ErrorInfo\n gradedTestCase: GradedTestCaseUpdate\n recordedTestCase: RecordedTestCaseUpdate\n finished: commons.EmptyObject\n WorkspaceSubmissionUpdate:\n properties:\n updateTime: datetime\n updateInfo: WorkspaceSubmissionUpdateInfo\n WorkspaceSubmissionUpdateInfo:\n union:\n running: RunningSubmissionState\n ran: WorkspaceRunDetails\n stopped: commons.EmptyObject\n traced: commons.EmptyObject\n tracedV2: WorkspaceTracedUpdate\n errored: ErrorInfo\n finished: commons.EmptyObject\n GradedTestCaseUpdate:\n properties:\n testCaseId: problemV2.TestCaseId\n grade: TestCaseGrade\n RecordedTestCaseUpdate:\n properties:\n testCaseId: problemV2.TestCaseId\n traceResponsesSize: integer\n WorkspaceTracedUpdate:\n properties:\n traceResponsesSize: integer\n SubmissionState:\n properties:\n timeSubmitted: optional\n submission: string\n language: commons.Language\n submissionTypeState: SubmissionTypeState\n SubmissionTypeState:\n union:\n test: TestSubmissionState\n workspace: WorkspaceSubmissionState\n WorkspaceSubmissionState:\n properties:\n status: WorkspaceSubmissionStatus\n WorkspaceSubmissionStatus:\n union:\n stopped: commons.EmptyObject\n errored: ErrorInfo\n running: RunningSubmissionState\n ran: WorkspaceRunDetails\n traced: WorkspaceRunDetails\n TestSubmissionState:\n properties:\n problemId: commons.ProblemId\n defaultTestCases: list\n customTestCases: list\n status: TestSubmissionStatus\n TestSubmissionStatus:\n union:\n stopped: commons.EmptyObject\n errored: ErrorInfo\n running: RunningSubmissionState\n testCaseIdToState: map\n SubmissionStatusForTestCase:\n union:\n graded: TestCaseResultWithStdout\n gradedV2: TestCaseGrade\n traced: TracedTestCase\n TracedTestCase:\n properties:\n result: TestCaseResultWithStdout\n traceResponsesSize: integer\n TraceResponsesPage:\n properties:\n offset:\n type: optional\n docs: |\n If present, use this to load subseqent pages.\n The offset is the id of the next trace response to load.\n traceResponses: list\n TraceResponsesPageV2:\n properties:\n offset:\n type: optional\n docs: |\n If present, use this to load subseqent pages.\n The offset is the id of the next trace response to load.\n traceResponses: list\n GetTraceResponsesPageRequest:\n properties:\n offset:\n type: optional\n WorkspaceStarterFilesResponse:\n properties:\n files: map\n WorkspaceStarterFilesResponseV2:\n properties:\n filesByLanguage: map\n WorkspaceFiles:\n properties:\n mainFile: commons.FileInfo\n readOnlyFiles: list\n ExecutionSessionsState:\n properties:\n states: map\n numWarmingInstances: optional\n warmingSessionIds: list\n ExecutionSessionState:\n properties:\n lastTimeContacted: optional\n sessionId: string\n isWarmInstance: boolean\n awsTaskId: optional\n language: commons.Language\n status: ExecutionSessionStatus\nimports:\n commons: ../commons/__package__.yml\n problemV2: ../ProblemInfoServicV2/__package__.yml\nservice:\n auth: false\n base-path: ''\n endpoints:\n createExecutionSession:\n auth: true\n path: /create-session/{language}\n method: POST\n response: ExecutionSessionResponse\n path-parameters:\n language: commons.Language\n getExecutionSession:\n auth: true\n path: /{sessionId}\n method: GET\n response: optional\n path-parameters:\n sessionId: string\n stopExecutionSession:\n auth: true\n path: /stop/{sessionId}\n method: DELETE\n path-parameters:\n sessionId: string\n getExecutionSessionsState:\n auth: true\n path: /execution-sessions-state\n method: GET\n response: ExecutionSessionsState\n", + "rawContents": "service:\n auth: false\n base-path: /sessions\n endpoints:\n createExecutionSession:\n auth: true\n path: /create-session/{language}\n method: POST\n response: ExecutionSessionResponse\n path-parameters:\n language: commons.Language\n getExecutionSession:\n auth: true\n path: /{sessionId}\n method: GET\n response: optional\n path-parameters:\n sessionId: string\n stopExecutionSession:\n auth: true\n path: /stop/{sessionId}\n method: DELETE\n path-parameters:\n sessionId: string\n getExecutionSessionsState:\n auth: true\n path: /execution-sessions-state\n method: GET\n response: ExecutionSessionsState\ntypes:\n SubmissionId:\n type: string\n ShareId:\n type: string\n SubmissionRequest:\n union:\n initializeProblemRequest: InitializeProblemRequest\n initializeWorkspaceRequest: commons.EmptyObject\n submitV2: SubmitRequestV2\n workspaceSubmit: WorkspaceSubmitRequest\n stop: StopRequest\n InitializeProblemRequest:\n properties:\n problemId: commons.ProblemId\n problemVersion: optional\n SubmitRequestV2:\n properties:\n submissionId: SubmissionId\n language: commons.Language\n submissionFiles: list\n problemId: commons.ProblemId\n problemVersion: optional\n userId: optional\n WorkspaceSubmitRequest:\n properties:\n submissionId: SubmissionId\n language: commons.Language\n submissionFiles: list\n userId: optional\n SubmissionFileInfo:\n properties:\n directory: string\n filename: string\n contents: string\n SubmissionTypeEnum:\n enum:\n - TEST\n StopRequest:\n properties:\n submissionId: SubmissionId\n SubmissionResponse:\n union:\n serverInitialized: commons.EmptyObject\n problemInitialized: commons.ProblemId\n workspaceInitialized: commons.EmptyObject\n serverErrored: ExceptionInfo\n codeExecutionUpdate: CodeExecutionUpdate\n terminated: TerminatedResponse\n CodeExecutionUpdate:\n union:\n buildingExecutor:\n type: BuildingExecutorResponse\n docs: >-\n Statuses if an executor for the session isn't ready (Before\n RunningResponse).\n running:\n type: RunningResponse\n docs: Sent once a test submission is executing.\n errored:\n type: ErroredResponse\n docs: Sent if a submission cannot be run (i.e. Compile Error).\n stopped:\n type: StoppedResponse\n docs: Sent if a submission is stopped.\n graded:\n type: GradedResponse\n docs: Graded testcases without trace information.\n gradedV2:\n type: GradedResponseV2\n docs: Graded submission for v2 problems.\n workspaceRan:\n type: WorkspaceRanResponse\n docs: Workspace run without trace information.\n recording:\n type: RecordingResponseNotification\n docs: Gives progress about what is being recorded.\n recorded:\n type: RecordedResponseNotification\n docs: Graded testcases with trace information.\n invalidRequest:\n type: InvalidRequestResponse\n docs: Sent if an invalid request is sent for a submission.\n finished:\n type: FinishedResponse\n docs: Sent once a submission is graded and fully recorded.\n BuildingExecutorResponse:\n properties:\n submissionId: SubmissionId\n status: ExecutionSessionStatus\n RunningResponse:\n properties:\n submissionId: SubmissionId\n state: RunningSubmissionState\n RunningSubmissionState:\n enum:\n - QUEUEING_SUBMISSION\n - KILLING_HISTORICAL_SUBMISSIONS\n - WRITING_SUBMISSION_TO_FILE\n - COMPILING_SUBMISSION\n - RUNNING_SUBMISSION\n ErroredResponse:\n properties:\n submissionId: SubmissionId\n errorInfo: ErrorInfo\n ErrorInfo:\n union:\n compileError: CompileError\n runtimeError:\n type: RuntimeError\n docs: >\n If the submission cannot be executed and throws a runtime error before\n getting to any of the testcases.\n internalError:\n type: InternalError\n docs: |\n If the trace backend encounters an unexpected error.\n CompileError:\n properties:\n message: string\n RuntimeError:\n properties:\n message: string\n InternalError:\n properties:\n exceptionInfo: ExceptionInfo\n StoppedResponse:\n properties:\n submissionId: SubmissionId\n WorkspaceRanResponse:\n properties:\n submissionId: SubmissionId\n runDetails: WorkspaceRunDetails\n WorkspaceRunDetails:\n properties:\n exceptionV2: optional\n exception: optional\n stdout: string\n GradedResponse:\n properties:\n submissionId: SubmissionId\n testCases: map\n GradedResponseV2:\n properties:\n submissionId: SubmissionId\n testCases: map\n TestCaseGrade:\n union:\n hidden: TestCaseHiddenGrade\n nonHidden: TestCaseNonHiddenGrade\n TestCaseHiddenGrade:\n properties:\n passed: boolean\n TestCaseNonHiddenGrade:\n properties:\n passed: boolean\n actualResult: optional\n exception: optional\n stdout: string\n RecordedResponseNotification:\n properties:\n submissionId: SubmissionId\n traceResponsesSize: integer\n testCaseId: optional\n RecordingResponseNotification:\n properties:\n submissionId: SubmissionId\n testCaseId: optional\n lineNumber: integer\n lightweightStackInfo: LightweightStackframeInformation\n tracedFile: optional\n LightweightStackframeInformation:\n properties:\n numStackFrames: integer\n topStackFrameMethodName: string\n TestCaseResultWithStdout:\n properties:\n result: TestCaseResult\n stdout: string\n TestCaseResult:\n properties:\n expectedResult: commons.VariableValue\n actualResult: ActualResult\n passed: boolean\n ActualResult:\n union:\n value: commons.VariableValue\n exception: ExceptionInfo\n exceptionV2: ExceptionV2\n ExceptionV2:\n union:\n generic: ExceptionInfo\n timeout: commons.EmptyObject\n ExceptionInfo:\n properties:\n exceptionType: string\n exceptionMessage: string\n exceptionStacktrace: string\n InvalidRequestResponse:\n properties:\n request: SubmissionRequest\n cause: InvalidRequestCause\n InvalidRequestCause:\n union:\n submissionIdNotFound:\n type: SubmissionIdNotFound\n docs: The submission request references a submission id that doesn't exist.\n customTestCasesUnsupported:\n type: CustomTestCasesUnsupported\n unexpectedLanguage:\n type: UnexpectedLanguageError\n docs: The submission request was routed to an incorrect language executor.\n ExistingSubmissionExecuting:\n properties:\n submissionId: SubmissionId\n SubmissionIdNotFound:\n properties:\n missingSubmissionId: SubmissionId\n CustomTestCasesUnsupported:\n properties:\n problemId: commons.ProblemId\n submissionId: SubmissionId\n UnexpectedLanguageError:\n properties:\n expectedLanguage: commons.Language\n actualLanguage: commons.Language\n TerminatedResponse:\n properties: {}\n FinishedResponse:\n properties:\n submissionId: SubmissionId\n StdoutResponse:\n properties:\n submissionId: SubmissionId\n stdout: string\n StderrResponse:\n properties:\n submissionId: SubmissionId\n stderr: string\n TraceResponse:\n properties:\n submissionId: SubmissionId\n lineNumber: integer\n returnValue: optional\n expressionLocation: optional\n stack: StackInformation\n stdout: optional\n TraceResponseV2:\n properties:\n submissionId: SubmissionId\n lineNumber: integer\n file: TracedFile\n returnValue: optional\n expressionLocation: optional\n stack: StackInformation\n stdout: optional\n TracedFile:\n properties:\n filename: string\n directory: string\n ExpressionLocation:\n properties:\n start: integer\n offset: integer\n StackInformation:\n properties:\n numStackFrames: integer\n topStackFrame: optional\n StackFrame:\n properties:\n methodName: string\n lineNumber: integer\n scopes: list\n Scope:\n properties:\n variables: map\n ExecutionSessionResponse:\n properties:\n sessionId: string\n executionSessionUrl: optional\n language: commons.Language\n status: ExecutionSessionStatus\n ExecutionSessionStatus:\n enum:\n - CREATING_CONTAINER\n - PROVISIONING_CONTAINER\n - PENDING_CONTAINER\n - RUNNING_CONTAINER\n - LIVE_CONTAINER\n - FAILED_TO_LAUNCH\n SubmissionStateV2:\n properties:\n timeSubmitted: datetime\n language: commons.Language\n submissionFiles: list\n submissionStatus: SubmissionStatusV2\n SubmissionStatusV2:\n union:\n test: TestSubmissionStatusV2\n workspace: WorkspaceSubmissionStatusV2\n TestSubmissionStatusV2:\n properties:\n updates: list\n problemId: commons.ProblemId\n problemVersion: integer\n problemInfo: problemV2.ProblemInfoV2\n WorkspaceSubmissionStatusV2:\n properties:\n updates: list\n TestSubmissionUpdate:\n properties:\n updateTime: datetime\n updateInfo: TestSubmissionUpdateInfo\n TestSubmissionUpdateInfo:\n union:\n running: RunningSubmissionState\n stopped: commons.EmptyObject\n errored: ErrorInfo\n gradedTestCase: GradedTestCaseUpdate\n recordedTestCase: RecordedTestCaseUpdate\n finished: commons.EmptyObject\n WorkspaceSubmissionUpdate:\n properties:\n updateTime: datetime\n updateInfo: WorkspaceSubmissionUpdateInfo\n WorkspaceSubmissionUpdateInfo:\n union:\n running: RunningSubmissionState\n ran: WorkspaceRunDetails\n stopped: commons.EmptyObject\n traced: commons.EmptyObject\n tracedV2: WorkspaceTracedUpdate\n errored: ErrorInfo\n finished: commons.EmptyObject\n GradedTestCaseUpdate:\n properties:\n testCaseId: problemV2.TestCaseId\n grade: TestCaseGrade\n RecordedTestCaseUpdate:\n properties:\n testCaseId: problemV2.TestCaseId\n traceResponsesSize: integer\n WorkspaceTracedUpdate:\n properties:\n traceResponsesSize: integer\n SubmissionState:\n properties:\n timeSubmitted: optional\n submission: string\n language: commons.Language\n submissionTypeState: SubmissionTypeState\n SubmissionTypeState:\n union:\n test: TestSubmissionState\n workspace: WorkspaceSubmissionState\n WorkspaceSubmissionState:\n properties:\n status: WorkspaceSubmissionStatus\n WorkspaceSubmissionStatus:\n union:\n stopped: commons.EmptyObject\n errored: ErrorInfo\n running: RunningSubmissionState\n ran: WorkspaceRunDetails\n traced: WorkspaceRunDetails\n TestSubmissionState:\n properties:\n problemId: commons.ProblemId\n defaultTestCases: list\n customTestCases: list\n status: TestSubmissionStatus\n TestSubmissionStatus:\n union:\n stopped: commons.EmptyObject\n errored: ErrorInfo\n running: RunningSubmissionState\n testCaseIdToState: map\n SubmissionStatusForTestCase:\n union:\n graded: TestCaseResultWithStdout\n gradedV2: TestCaseGrade\n traced: TracedTestCase\n TracedTestCase:\n properties:\n result: TestCaseResultWithStdout\n traceResponsesSize: integer\n TraceResponsesPage:\n properties:\n offset:\n type: optional\n docs: |\n If present, use this to load subseqent pages.\n The offset is the id of the next trace response to load.\n traceResponses: list\n TraceResponsesPageV2:\n properties:\n offset:\n type: optional\n docs: |\n If present, use this to load subseqent pages.\n The offset is the id of the next trace response to load.\n traceResponses: list\n GetTraceResponsesPageRequest:\n properties:\n offset:\n type: optional\n WorkspaceStarterFilesResponse:\n properties:\n files: map\n WorkspaceStarterFilesResponseV2:\n properties:\n filesByLanguage: map\n WorkspaceFiles:\n properties:\n mainFile: commons.FileInfo\n readOnlyFiles: list\n ExecutionSessionsState:\n properties:\n states: map\n numWarmingInstances: optional\n warmingSessionIds: list\n ExecutionSessionState:\n properties:\n lastTimeContacted: optional\n sessionId: string\n isWarmInstance: boolean\n awsTaskId: optional\n language: commons.Language\n status: ExecutionSessionStatus\nimports:\n commons: ../commons/__package__.yml\n problemV2: ../ProblemInfoServicV2/__package__.yml\n", "contents": { + "service": { + "auth": false, + "base-path": "/sessions", + "endpoints": { + "createExecutionSession": { + "auth": true, + "path": "/create-session/{language}", + "method": "POST", + "response": "ExecutionSessionResponse", + "path-parameters": { + "language": "commons.Language" + } + }, + "getExecutionSession": { + "auth": true, + "path": "/{sessionId}", + "method": "GET", + "response": "optional", + "path-parameters": { + "sessionId": "string" + } + }, + "stopExecutionSession": { + "auth": true, + "path": "/stop/{sessionId}", + "method": "DELETE", + "path-parameters": { + "sessionId": "string" + } + }, + "getExecutionSessionsState": { + "auth": true, + "path": "/execution-sessions-state", + "method": "GET", + "response": "ExecutionSessionsState" + } + } + }, "types": { "SubmissionId": { "type": "string" @@ -752,51 +790,25 @@ "imports": { "commons": "../commons/__package__.yml", "problemV2": "../ProblemInfoServicV2/__package__.yml" - }, + } + } + }, + "MigrationInfo/__package__.yml": { + "absoluteFilepath": "/DUMMY_PATH", + "rawContents": "service:\n auth: false\n base-path: /migration-info\n endpoints:\n getAttemptedMigrations:\n auth: true\n path: /all\n method: GET\n response: list\ntypes:\n MigrationStatus:\n enum:\n - RUNNING\n - FAILED\n - FINISHED\n Migration:\n properties:\n name: string\n status: MigrationStatus\n", + "contents": { "service": { "auth": false, - "base-path": "", + "base-path": "/migration-info", "endpoints": { - "createExecutionSession": { - "auth": true, - "path": "/create-session/{language}", - "method": "POST", - "response": "ExecutionSessionResponse", - "path-parameters": { - "language": "commons.Language" - } - }, - "getExecutionSession": { - "auth": true, - "path": "/{sessionId}", - "method": "GET", - "response": "optional", - "path-parameters": { - "sessionId": "string" - } - }, - "stopExecutionSession": { - "auth": true, - "path": "/stop/{sessionId}", - "method": "DELETE", - "path-parameters": { - "sessionId": "string" - } - }, - "getExecutionSessionsState": { + "getAttemptedMigrations": { "auth": true, - "path": "/execution-sessions-state", + "path": "/all", "method": "GET", - "response": "ExecutionSessionsState" + "response": "list" } } - } - } - }, - "MigrationInfo/__package__.yml": { - "absoluteFilepath": "/DUMMY_PATH", - "rawContents": "types:\n MigrationStatus:\n enum:\n - RUNNING\n - FAILED\n - FINISHED\n Migration:\n properties:\n name: string\n status: MigrationStatus\nservice:\n auth: false\n base-path: ''\n endpoints:\n getAttemptedMigrations:\n auth: true\n path: /all\n method: GET\n response: list\n", - "contents": { + }, "types": { "MigrationStatus": { "enum": [ @@ -811,56 +823,16 @@ "status": "MigrationStatus" } } - }, - "service": { - "auth": false, - "base-path": "", - "endpoints": { - "getAttemptedMigrations": { - "auth": true, - "path": "/all", - "method": "GET", - "response": "list" - } - } } } }, "PlaylistCrud/__package__.yml": { "absoluteFilepath": "/DUMMY_PATH", - "rawContents": "types:\n PlaylistId:\n type: string\n Playlist:\n properties:\n playlistId: PlaylistId\n name: string\n problems: list\n ownerId: commons.UserId\n CreatePlaylistRequest:\n properties:\n name: string\n problems: list\n UpdatePlaylistRequest:\n properties:\n name: string\n problems: list\nimports:\n commons: ../commons/__package__.yml\nservice:\n auth: false\n base-path: ''\n endpoints:\n createPlaylist:\n auth: true\n path: /create\n method: POST\n response: Playlist\n request:\n body:\n type: CreatePlaylistRequest\n getPlaylists:\n auth: true\n path: /all\n method: GET\n response: list\n getPlaylist:\n auth: true\n path: /{playlistId}\n method: GET\n response: Playlist\n path-parameters:\n playlistId: PlaylistId\n updatePlaylist:\n auth: true\n path: /{playlistId}\n method: PUT\n response: Playlist\n path-parameters:\n playlistId: PlaylistId\n request:\n body:\n type: UpdatePlaylistRequest\n deletePlaylist:\n auth: true\n path: /{playlistId}\n method: DELETE\n path-parameters:\n playlistId: PlaylistId\n", + "rawContents": "service:\n auth: false\n base-path: /playlist\n endpoints:\n createPlaylist:\n auth: true\n path: /create\n method: POST\n response: Playlist\n request:\n body:\n type: CreatePlaylistRequest\n getPlaylists:\n auth: true\n path: /all\n method: GET\n response: list\n getPlaylist:\n auth: true\n path: /{playlistId}\n method: GET\n response: Playlist\n path-parameters:\n playlistId: PlaylistId\n updatePlaylist:\n auth: true\n path: /{playlistId}\n method: PUT\n response: Playlist\n path-parameters:\n playlistId: PlaylistId\n request:\n body:\n type: UpdatePlaylistRequest\n deletePlaylist:\n auth: true\n path: /{playlistId}\n method: DELETE\n path-parameters:\n playlistId: PlaylistId\ntypes:\n PlaylistId:\n type: string\n Playlist:\n properties:\n playlistId: PlaylistId\n name: string\n problems: list\n ownerId: commons.UserId\n CreatePlaylistRequest:\n properties:\n name: string\n problems: list\n UpdatePlaylistRequest:\n properties:\n name: string\n problems: list\nimports:\n commons: ../commons/__package__.yml\n", "contents": { - "types": { - "PlaylistId": { - "type": "string" - }, - "Playlist": { - "properties": { - "playlistId": "PlaylistId", - "name": "string", - "problems": "list", - "ownerId": "commons.UserId" - } - }, - "CreatePlaylistRequest": { - "properties": { - "name": "string", - "problems": "list" - } - }, - "UpdatePlaylistRequest": { - "properties": { - "name": "string", - "problems": "list" - } - } - }, - "imports": { - "commons": "../commons/__package__.yml" - }, "service": { "auth": false, - "base-path": "", + "base-path": "/playlist", "endpoints": { "createPlaylist": { "auth": true, @@ -911,20 +883,44 @@ } } } + }, + "types": { + "PlaylistId": { + "type": "string" + }, + "Playlist": { + "properties": { + "playlistId": "PlaylistId", + "name": "string", + "problems": "list", + "ownerId": "commons.UserId" + } + }, + "CreatePlaylistRequest": { + "properties": { + "name": "string", + "problems": "list" + } + }, + "UpdatePlaylistRequest": { + "properties": { + "name": "string", + "problems": "list" + } + } + }, + "imports": { + "commons": "../commons/__package__.yml" } } }, "PlaylistCrudServiceV2/__package__.yml": { "absoluteFilepath": "/DUMMY_PATH", - "rawContents": "imports:\n commons: ../commons/__package__.yml\n playlist: ../PlaylistCrud/__package__.yml\nservice:\n auth: false\n base-path: ''\n endpoints:\n createPlaylist:\n auth: true\n path: /create\n method: POST\n response: playlist.Playlist\n request:\n body:\n type: playlist.CreatePlaylistRequest\n getPlaylists:\n auth: true\n path: /all\n method: GET\n response: list\n getPlaylist:\n auth: true\n path: /{playlistId}\n method: GET\n response: playlist.Playlist\n path-parameters:\n playlistId: playlist.PlaylistId\n updatePlaylist:\n auth: true\n path: /{playlistId}\n method: PUT\n response: playlist.Playlist\n path-parameters:\n playlistId: playlist.PlaylistId\n request:\n body:\n type: playlist.UpdatePlaylistRequest\n deletePlaylist:\n auth: true\n path: /{playlistId}\n method: DELETE\n path-parameters:\n playlistId: playlist.PlaylistId\n", + "rawContents": "service:\n auth: false\n base-path: /v2/playlist\n endpoints:\n createPlaylist:\n auth: true\n path: /create\n method: POST\n response: playlist.Playlist\n request:\n body:\n type: playlist.CreatePlaylistRequest\n getPlaylists:\n auth: true\n path: /all\n method: GET\n response: list\n getPlaylist:\n auth: true\n path: /{playlistId}\n method: GET\n response: playlist.Playlist\n path-parameters:\n playlistId: playlist.PlaylistId\n updatePlaylist:\n auth: true\n path: /{playlistId}\n method: PUT\n response: playlist.Playlist\n path-parameters:\n playlistId: playlist.PlaylistId\n request:\n body:\n type: playlist.UpdatePlaylistRequest\n deletePlaylist:\n auth: true\n path: /{playlistId}\n method: DELETE\n path-parameters:\n playlistId: playlist.PlaylistId\nimports:\n commons: ../commons/__package__.yml\n playlist: ../PlaylistCrud/__package__.yml\n", "contents": { - "imports": { - "commons": "../commons/__package__.yml", - "playlist": "../PlaylistCrud/__package__.yml" - }, "service": { "auth": false, - "base-path": "", + "base-path": "/v2/playlist", "endpoints": { "createPlaylist": { "auth": true, @@ -975,13 +971,67 @@ } } } + }, + "imports": { + "commons": "../commons/__package__.yml", + "playlist": "../PlaylistCrud/__package__.yml" } } }, "ProblemCrud/__package__.yml": { "absoluteFilepath": "/DUMMY_PATH", - "rawContents": "types:\n ProblemInfo:\n properties:\n problemId: commons.ProblemId\n problemDescription: ProblemDescription\n problemName: string\n problemVersion: integer\n files: map\n inputParams: list\n outputType: commons.VariableType\n testcases: list\n methodName: string\n supportsCustomTestCases: boolean\n ProblemDescription:\n properties:\n boards: list\n ProblemDescriptionBoard:\n union:\n html: string\n variable: commons.VariableValue\n testCaseId: string\n ProblemFiles:\n properties:\n solutionFile: commons.FileInfo\n readOnlyFiles: list\n VariableTypeAndName:\n properties:\n variableType: commons.VariableType\n name: string\n CreateProblemRequest:\n properties:\n problemName: string\n problemDescription: ProblemDescription\n files: map\n inputParams: list\n outputType: commons.VariableType\n testcases: list\n methodName: string\n CreateProblemResponse:\n union:\n success: commons.ProblemId\n error: CreateProblemError\n CreateProblemError:\n union:\n generic: GenericCreateProblemError\n GenericCreateProblemError:\n properties:\n message: string\n type: string\n stacktrace: string\n UpdateProblemResponse:\n properties:\n problemVersion: integer\n GetDefaultStarterFilesRequest:\n properties:\n inputParams: list\n outputType: commons.VariableType\n methodName: string\n GetDefaultStarterFilesResponse:\n properties:\n files: map\nimports:\n commons: ../commons/__package__.yml\nservice:\n auth: false\n base-path: ''\n endpoints:\n createProblem:\n auth: true\n path: /create\n method: POST\n response: CreateProblemResponse\n request:\n body:\n type: CreateProblemRequest\n updateProblem:\n auth: true\n path: /update/{problemId}\n method: POST\n response: UpdateProblemResponse\n path-parameters:\n problemId: commons.ProblemId\n request:\n body:\n type: CreateProblemRequest\n deleteProblem:\n auth: true\n path: /delete/{problemId}\n method: DELETE\n path-parameters:\n problemId: commons.ProblemId\n getDefaultStarterFiles:\n auth: true\n path: /default-starter-files\n method: POST\n response: GetDefaultStarterFilesResponse\n request:\n body:\n type: GetDefaultStarterFilesRequest\n", + "rawContents": "service:\n auth: false\n base-path: /problem-crud\n endpoints:\n createProblem:\n auth: true\n path: /create\n method: POST\n response: CreateProblemResponse\n request:\n body:\n type: CreateProblemRequest\n updateProblem:\n auth: true\n path: /update/{problemId}\n method: POST\n response: UpdateProblemResponse\n path-parameters:\n problemId: commons.ProblemId\n request:\n body:\n type: CreateProblemRequest\n deleteProblem:\n auth: true\n path: /delete/{problemId}\n method: DELETE\n path-parameters:\n problemId: commons.ProblemId\n getDefaultStarterFiles:\n auth: true\n path: /default-starter-files\n method: POST\n response: GetDefaultStarterFilesResponse\n request:\n body:\n type: GetDefaultStarterFilesRequest\ntypes:\n ProblemInfo:\n properties:\n problemId: commons.ProblemId\n problemDescription: ProblemDescription\n problemName: string\n problemVersion: integer\n files: map\n inputParams: list\n outputType: commons.VariableType\n testcases: list\n methodName: string\n supportsCustomTestCases: boolean\n ProblemDescription:\n properties:\n boards: list\n ProblemDescriptionBoard:\n union:\n html: string\n variable: commons.VariableValue\n testCaseId: string\n ProblemFiles:\n properties:\n solutionFile: commons.FileInfo\n readOnlyFiles: list\n VariableTypeAndName:\n properties:\n variableType: commons.VariableType\n name: string\n CreateProblemRequest:\n properties:\n problemName: string\n problemDescription: ProblemDescription\n files: map\n inputParams: list\n outputType: commons.VariableType\n testcases: list\n methodName: string\n CreateProblemResponse:\n union:\n success: commons.ProblemId\n error: CreateProblemError\n CreateProblemError:\n union:\n generic: GenericCreateProblemError\n GenericCreateProblemError:\n properties:\n message: string\n type: string\n stacktrace: string\n UpdateProblemResponse:\n properties:\n problemVersion: integer\n GetDefaultStarterFilesRequest:\n properties:\n inputParams: list\n outputType: commons.VariableType\n methodName: string\n GetDefaultStarterFilesResponse:\n properties:\n files: map\nimports:\n commons: ../commons/__package__.yml\n", "contents": { + "service": { + "auth": false, + "base-path": "/problem-crud", + "endpoints": { + "createProblem": { + "auth": true, + "path": "/create", + "method": "POST", + "response": "CreateProblemResponse", + "request": { + "body": { + "type": "CreateProblemRequest" + } + } + }, + "updateProblem": { + "auth": true, + "path": "/update/{problemId}", + "method": "POST", + "response": "UpdateProblemResponse", + "path-parameters": { + "problemId": "commons.ProblemId" + }, + "request": { + "body": { + "type": "CreateProblemRequest" + } + } + }, + "deleteProblem": { + "auth": true, + "path": "/delete/{problemId}", + "method": "DELETE", + "path-parameters": { + "problemId": "commons.ProblemId" + } + }, + "getDefaultStarterFiles": { + "auth": true, + "path": "/default-starter-files", + "method": "POST", + "response": "GetDefaultStarterFilesResponse", + "request": { + "body": { + "type": "GetDefaultStarterFilesRequest" + } + } + } + } + }, "types": { "ProblemInfo": { "properties": { @@ -1070,19 +1120,25 @@ }, "imports": { "commons": "../commons/__package__.yml" - }, + } + } + }, + "ProblemCrudServiceV2/__package__.yml": { + "absoluteFilepath": "/DUMMY_PATH", + "rawContents": "service:\n auth: false\n base-path: /problem-crud-v2\n endpoints:\n createProblem:\n auth: true\n path: /create\n method: POST\n response: problem.CreateProblemResponse\n request:\n body:\n type: CreateProblemRequestV2\n updateProblem:\n auth: true\n path: /update/{problemId}\n method: POST\n response: problem.UpdateProblemResponse\n path-parameters:\n problemId: commons.ProblemId\n request:\n body:\n type: CreateProblemRequestV2\n deleteProblem:\n auth: true\n path: /delete/{problemId}\n method: DELETE\n path-parameters:\n problemId: commons.ProblemId\n getFunctionSignature:\n auth: true\n path: /function-signature\n method: POST\n response: GetFunctionSignatureResponse\n request:\n body:\n type: GetFunctionSignatureRequest\n getBasicSolutionFile:\n auth: true\n path: /basic-solution-file\n method: POST\n response: GetBasicSolutionFileResponse\n request:\n body:\n type: GetBasicSolutionFileRequest\n getDefaultDirectoryForProblemFiles:\n auth: true\n path: /default-problem-files-directory\n method: GET\n response: map\n getGeneratedTestCaseFile:\n auth: true\n path: /generated-test-case-file\n method: POST\n response: map\n request:\n body:\n type: GetGeneratedTestCaseFileRequest\n getGeneratedTestCaseTemplateFile:\n auth: true\n path: /generated-test-case-template-file\n method: POST\n response: map\n request:\n body:\n type: GetGeneratedTestCaseTemplateFileRequest\ntypes:\n TestCaseTemplateId:\n type: string\n TestCaseId:\n type: string\n ParameterId:\n type: string\n ProblemInfoV2:\n properties:\n problemId: commons.ProblemId\n problemDescription: problem.ProblemDescription\n problemName: string\n problemVersion: integer\n supportedLanguages: set\n customFiles: CustomFiles\n generatedFiles: GeneratedFiles\n customTestCaseTemplates: list\n testcases: list\n isPublic: boolean\n LightweightProblemInfoV2:\n properties:\n problemId: commons.ProblemId\n problemName: string\n problemVersion: integer\n variableTypes: set\n CreateProblemRequestV2:\n properties:\n problemName: string\n problemDescription: problem.ProblemDescription\n customFiles: CustomFiles\n customTestCaseTemplates: list\n testcases: list\n supportedLanguages: set\n isPublic: boolean\n TestCaseV2:\n properties:\n metadata: TestCaseMetadata\n implementation: TestCaseImplementationReference\n arguments: map\n expects: optional\n TestCaseExpects:\n properties:\n expectedStdout: optional\n TestCaseImplementationReference:\n union:\n templateId: TestCaseTemplateId\n implementation: TestCaseImplementation\n BasicTestCaseTemplate:\n properties:\n templateId: TestCaseTemplateId\n name: string\n description: TestCaseImplementationDescription\n expectedValueParameterId: ParameterId\n TestCaseTemplate:\n properties:\n templateId: TestCaseTemplateId\n name: string\n implementation: TestCaseImplementation\n TestCaseImplementation:\n properties:\n description: TestCaseImplementationDescription\n function: TestCaseFunction\n TestCaseFunction:\n union:\n withActualResult: TestCaseWithActualResultImplementation\n custom: VoidFunctionDefinition\n TestCaseWithActualResultImplementation:\n properties:\n getActualResult: NonVoidFunctionDefinition\n assertCorrectnessCheck: AssertCorrectnessCheck\n VoidFunctionDefinition:\n properties:\n parameters: list\n code: FunctionImplementationForMultipleLanguages\n Parameter:\n properties:\n parameterId: ParameterId\n name: string\n variableType: commons.VariableType\n NonVoidFunctionDefinition:\n properties:\n signature: NonVoidFunctionSignature\n code: FunctionImplementationForMultipleLanguages\n VoidFunctionSignature:\n properties:\n parameters: list\n NonVoidFunctionSignature:\n properties:\n parameters: list\n returnType: commons.VariableType\n VoidFunctionSignatureThatTakesActualResult:\n properties:\n parameters: list\n actualResultType: commons.VariableType\n AssertCorrectnessCheck:\n union:\n deepEquality: DeepEqualityCorrectnessCheck\n custom: VoidFunctionDefinitionThatTakesActualResult\n DeepEqualityCorrectnessCheck:\n properties:\n expectedValueParameterId: ParameterId\n VoidFunctionDefinitionThatTakesActualResult:\n properties:\n additionalParameters: list\n code: FunctionImplementationForMultipleLanguages\n TestCaseImplementationDescription:\n properties:\n boards: list\n TestCaseImplementationDescriptionBoard:\n union:\n html: string\n paramId: ParameterId\n TestCaseMetadata:\n properties:\n id: TestCaseId\n name: string\n hidden: boolean\n FunctionImplementationForMultipleLanguages:\n properties:\n codeByLanguage: map\n FunctionImplementation:\n properties:\n impl: string;\n imports: optional;\n GeneratedFiles:\n properties:\n generatedTestCaseFiles: map\n generatedTemplateFiles: map\n other: map\n CustomFiles:\n union:\n basic: BasicCustomFiles\n custom: map\n BasicCustomFiles:\n properties:\n methodName: string\n signature: NonVoidFunctionSignature\n additionalFiles: map\n basicTestCaseTemplate: BasicTestCaseTemplate\n Files:\n properties:\n files: list\n FileInfoV2:\n properties:\n filename: string\n directory: string\n contents: string\n editable: boolean\n DefaultProvidedFile:\n properties:\n file: FileInfoV2\n relatedTypes: list\n GetBasicSolutionFileRequest:\n properties:\n methodName: string\n signature: NonVoidFunctionSignature\n GetBasicSolutionFileResponse:\n properties:\n solutionFileByLanguage: map\n GetFunctionSignatureRequest:\n properties:\n functionSignature: FunctionSignature\n FunctionSignature:\n union:\n void: VoidFunctionSignature\n nonVoid: NonVoidFunctionSignature\n voidThatTakesActualResult:\n type: VoidFunctionSignatureThatTakesActualResult\n docs: >-\n Useful when specifying custom grading for a testcase where\n actualResult is defined.\n GetFunctionSignatureResponse:\n properties:\n functionByLanguage: map\n GetDefaultProvidedFilesResponse:\n properties:\n filesByLanguage: map>\n GetGeneratedTestCaseFileRequest:\n properties:\n template: optional\n testCase: TestCaseV2\n GetGeneratedTestCaseTemplateFileRequest:\n properties:\n template: TestCaseTemplate\nimports:\n commons: ../commons/__package__.yml\n problem: ../ProblemInfo/__package__.yml\n", + "contents": { "service": { "auth": false, - "base-path": "", + "base-path": "/problem-crud-v2", "endpoints": { "createProblem": { "auth": true, "path": "/create", "method": "POST", - "response": "CreateProblemResponse", + "response": "problem.CreateProblemResponse", "request": { "body": { - "type": "CreateProblemRequest" + "type": "CreateProblemRequestV2" } } }, @@ -1090,13 +1146,13 @@ "auth": true, "path": "/update/{problemId}", "method": "POST", - "response": "UpdateProblemResponse", + "response": "problem.UpdateProblemResponse", "path-parameters": { "problemId": "commons.ProblemId" }, "request": { "body": { - "type": "CreateProblemRequest" + "type": "CreateProblemRequestV2" } } }, @@ -1108,25 +1164,58 @@ "problemId": "commons.ProblemId" } }, - "getDefaultStarterFiles": { + "getFunctionSignature": { "auth": true, - "path": "/default-starter-files", + "path": "/function-signature", "method": "POST", - "response": "GetDefaultStarterFilesResponse", + "response": "GetFunctionSignatureResponse", "request": { "body": { - "type": "GetDefaultStarterFilesRequest" + "type": "GetFunctionSignatureRequest" + } + } + }, + "getBasicSolutionFile": { + "auth": true, + "path": "/basic-solution-file", + "method": "POST", + "response": "GetBasicSolutionFileResponse", + "request": { + "body": { + "type": "GetBasicSolutionFileRequest" + } + } + }, + "getDefaultDirectoryForProblemFiles": { + "auth": true, + "path": "/default-problem-files-directory", + "method": "GET", + "response": "map" + }, + "getGeneratedTestCaseFile": { + "auth": true, + "path": "/generated-test-case-file", + "method": "POST", + "response": "map", + "request": { + "body": { + "type": "GetGeneratedTestCaseFileRequest" + } + } + }, + "getGeneratedTestCaseTemplateFile": { + "auth": true, + "path": "/generated-test-case-template-file", + "method": "POST", + "response": "map", + "request": { + "body": { + "type": "GetGeneratedTestCaseTemplateFileRequest" } } } } - } - } - }, - "ProblemCrudServiceV2/__package__.yml": { - "absoluteFilepath": "/DUMMY_PATH", - "rawContents": "types:\n TestCaseTemplateId:\n type: string\n TestCaseId:\n type: string\n ParameterId:\n type: string\n ProblemInfoV2:\n properties:\n problemId: commons.ProblemId\n problemDescription: problem.ProblemDescription\n problemName: string\n problemVersion: integer\n supportedLanguages: set\n customFiles: CustomFiles\n generatedFiles: GeneratedFiles\n customTestCaseTemplates: list\n testcases: list\n isPublic: boolean\n LightweightProblemInfoV2:\n properties:\n problemId: commons.ProblemId\n problemName: string\n problemVersion: integer\n variableTypes: set\n CreateProblemRequestV2:\n properties:\n problemName: string\n problemDescription: problem.ProblemDescription\n customFiles: CustomFiles\n customTestCaseTemplates: list\n testcases: list\n supportedLanguages: set\n isPublic: boolean\n TestCaseV2:\n properties:\n metadata: TestCaseMetadata\n implementation: TestCaseImplementationReference\n arguments: map\n expects: optional\n TestCaseExpects:\n properties:\n expectedStdout: optional\n TestCaseImplementationReference:\n union:\n templateId: TestCaseTemplateId\n implementation: TestCaseImplementation\n BasicTestCaseTemplate:\n properties:\n templateId: TestCaseTemplateId\n name: string\n description: TestCaseImplementationDescription\n expectedValueParameterId: ParameterId\n TestCaseTemplate:\n properties:\n templateId: TestCaseTemplateId\n name: string\n implementation: TestCaseImplementation\n TestCaseImplementation:\n properties:\n description: TestCaseImplementationDescription\n function: TestCaseFunction\n TestCaseFunction:\n union:\n withActualResult: TestCaseWithActualResultImplementation\n custom: VoidFunctionDefinition\n TestCaseWithActualResultImplementation:\n properties:\n getActualResult: NonVoidFunctionDefinition\n assertCorrectnessCheck: AssertCorrectnessCheck\n VoidFunctionDefinition:\n properties:\n parameters: list\n code: FunctionImplementationForMultipleLanguages\n Parameter:\n properties:\n parameterId: ParameterId\n name: string\n variableType: commons.VariableType\n NonVoidFunctionDefinition:\n properties:\n signature: NonVoidFunctionSignature\n code: FunctionImplementationForMultipleLanguages\n VoidFunctionSignature:\n properties:\n parameters: list\n NonVoidFunctionSignature:\n properties:\n parameters: list\n returnType: commons.VariableType\n VoidFunctionSignatureThatTakesActualResult:\n properties:\n parameters: list\n actualResultType: commons.VariableType\n AssertCorrectnessCheck:\n union:\n deepEquality: DeepEqualityCorrectnessCheck\n custom: VoidFunctionDefinitionThatTakesActualResult\n DeepEqualityCorrectnessCheck:\n properties:\n expectedValueParameterId: ParameterId\n VoidFunctionDefinitionThatTakesActualResult:\n properties:\n additionalParameters: list\n code: FunctionImplementationForMultipleLanguages\n TestCaseImplementationDescription:\n properties:\n boards: list\n TestCaseImplementationDescriptionBoard:\n union:\n html: string\n paramId: ParameterId\n TestCaseMetadata:\n properties:\n id: TestCaseId\n name: string\n hidden: boolean\n FunctionImplementationForMultipleLanguages:\n properties:\n codeByLanguage: map\n FunctionImplementation:\n properties:\n impl: string;\n imports: optional;\n GeneratedFiles:\n properties:\n generatedTestCaseFiles: map\n generatedTemplateFiles: map\n other: map\n CustomFiles:\n union:\n basic: BasicCustomFiles\n custom: map\n BasicCustomFiles:\n properties:\n methodName: string\n signature: NonVoidFunctionSignature\n additionalFiles: map\n basicTestCaseTemplate: BasicTestCaseTemplate\n Files:\n properties:\n files: list\n FileInfoV2:\n properties:\n filename: string\n directory: string\n contents: string\n editable: boolean\n DefaultProvidedFile:\n properties:\n file: FileInfoV2\n relatedTypes: list\n GetBasicSolutionFileRequest:\n properties:\n methodName: string\n signature: NonVoidFunctionSignature\n GetBasicSolutionFileResponse:\n properties:\n solutionFileByLanguage: map\n GetFunctionSignatureRequest:\n properties:\n functionSignature: FunctionSignature\n FunctionSignature:\n union:\n void: VoidFunctionSignature\n nonVoid: NonVoidFunctionSignature\n voidThatTakesActualResult:\n type: VoidFunctionSignatureThatTakesActualResult\n docs: >-\n Useful when specifying custom grading for a testcase where\n actualResult is defined.\n GetFunctionSignatureResponse:\n properties:\n functionByLanguage: map\n GetDefaultProvidedFilesResponse:\n properties:\n filesByLanguage: map>\n GetGeneratedTestCaseFileRequest:\n properties:\n template: optional\n testCase: TestCaseV2\n GetGeneratedTestCaseTemplateFileRequest:\n properties:\n template: TestCaseTemplate\nimports:\n commons: ../commons/__package__.yml\n problem: ../ProblemInfo/__package__.yml\nservice:\n auth: false\n base-path: ''\n endpoints:\n createProblem:\n auth: true\n path: /create\n method: POST\n response: problem.CreateProblemResponse\n request:\n body:\n type: CreateProblemRequestV2\n updateProblem:\n auth: true\n path: /update/{problemId}\n method: POST\n response: problem.UpdateProblemResponse\n path-parameters:\n problemId: commons.ProblemId\n request:\n body:\n type: CreateProblemRequestV2\n deleteProblem:\n auth: true\n path: /delete/{problemId}\n method: DELETE\n path-parameters:\n problemId: commons.ProblemId\n getFunctionSignature:\n auth: true\n path: /function-signature\n method: POST\n response: GetFunctionSignatureResponse\n request:\n body:\n type: GetFunctionSignatureRequest\n getBasicSolutionFile:\n auth: true\n path: /basic-solution-file\n method: POST\n response: GetBasicSolutionFileResponse\n request:\n body:\n type: GetBasicSolutionFileRequest\n getDefaultDirectoryForProblemFiles:\n auth: true\n path: /default-problem-files-directory\n method: GET\n response: map\n getGeneratedTestCaseFile:\n auth: true\n path: /generated-test-case-file\n method: POST\n response: map\n request:\n body:\n type: GetGeneratedTestCaseFileRequest\n getGeneratedTestCaseTemplateFile:\n auth: true\n path: /generated-test-case-template-file\n method: POST\n response: map\n request:\n body:\n type: GetGeneratedTestCaseTemplateFileRequest\n", - "contents": { + }, "types": { "TestCaseTemplateId": { "type": "string" @@ -1395,102 +1484,58 @@ "imports": { "commons": "../commons/__package__.yml", "problem": "../ProblemInfo/__package__.yml" - }, + } + } + }, + "ProblemInfo/__package__.yml": { + "absoluteFilepath": "/DUMMY_PATH", + "rawContents": "service:\n auth: false\n base-path: /problems\n endpoints:\n getProblems:\n auth: true\n path: /problem-info\n method: GET\n response: list\n getLatestProblem:\n auth: true\n path: /problem-info/{problemId}\n method: GET\n response: ProblemInfo\n path-parameters:\n problemId: commons.ProblemId\n getProblemVersion:\n auth: true\n path: /problem-info/{problemId}/version/{problemVersion}\n method: GET\n response: ProblemInfo\n path-parameters:\n problemId: commons.ProblemId\n problemVersion: integer\n getExpectedResult:\n auth: true\n path: /expected-result/{problemId}\n method: POST\n response: commons.TestCaseWithExpectedResult\n path-parameters:\n problemId: commons.ProblemId\n request:\n body:\n type: commons.TestCase\ntypes:\n ProblemInfo:\n properties:\n problemId: commons.ProblemId\n problemDescription: ProblemDescription\n problemName: string\n problemVersion: integer\n files: map\n inputParams: list\n outputType: commons.VariableType\n testcases: list\n methodName: string\n supportsCustomTestCases: boolean\n ProblemDescription:\n properties:\n boards: list\n ProblemDescriptionBoard:\n union:\n html: string\n variable: commons.VariableValue\n testCaseId: string\n ProblemFiles:\n properties:\n solutionFile: commons.FileInfo\n readOnlyFiles: list\n VariableTypeAndName:\n properties:\n variableType: commons.VariableType\n name: string\n CreateProblemRequest:\n properties:\n problemName: string\n problemDescription: ProblemDescription\n files: map\n inputParams: list\n outputType: commons.VariableType\n testcases: list\n methodName: string\n CreateProblemResponse:\n union:\n success: commons.ProblemId\n error: CreateProblemError\n CreateProblemError:\n union:\n generic: GenericCreateProblemError\n GenericCreateProblemError:\n properties:\n message: string\n type: string\n stacktrace: string\n UpdateProblemResponse:\n properties:\n problemVersion: integer\n GetDefaultStarterFilesRequest:\n properties:\n inputParams: list\n outputType: commons.VariableType\n methodName: string\n GetDefaultStarterFilesResponse:\n properties:\n files: map\nimports:\n commons: ../commons/__package__.yml\n", + "contents": { "service": { "auth": false, - "base-path": "", + "base-path": "/problems", "endpoints": { - "createProblem": { - "auth": true, - "path": "/create", - "method": "POST", - "response": "problem.CreateProblemResponse", - "request": { - "body": { - "type": "CreateProblemRequestV2" - } - } - }, - "updateProblem": { + "getProblems": { "auth": true, - "path": "/update/{problemId}", - "method": "POST", - "response": "problem.UpdateProblemResponse", - "path-parameters": { - "problemId": "commons.ProblemId" - }, - "request": { - "body": { - "type": "CreateProblemRequestV2" - } - } + "path": "/problem-info", + "method": "GET", + "response": "list" }, - "deleteProblem": { + "getLatestProblem": { "auth": true, - "path": "/delete/{problemId}", - "method": "DELETE", + "path": "/problem-info/{problemId}", + "method": "GET", + "response": "ProblemInfo", "path-parameters": { "problemId": "commons.ProblemId" } }, - "getFunctionSignature": { - "auth": true, - "path": "/function-signature", - "method": "POST", - "response": "GetFunctionSignatureResponse", - "request": { - "body": { - "type": "GetFunctionSignatureRequest" - } - } - }, - "getBasicSolutionFile": { - "auth": true, - "path": "/basic-solution-file", - "method": "POST", - "response": "GetBasicSolutionFileResponse", - "request": { - "body": { - "type": "GetBasicSolutionFileRequest" - } - } - }, - "getDefaultDirectoryForProblemFiles": { + "getProblemVersion": { "auth": true, - "path": "/default-problem-files-directory", + "path": "/problem-info/{problemId}/version/{problemVersion}", "method": "GET", - "response": "map" - }, - "getGeneratedTestCaseFile": { - "auth": true, - "path": "/generated-test-case-file", - "method": "POST", - "response": "map", - "request": { - "body": { - "type": "GetGeneratedTestCaseFileRequest" - } + "response": "ProblemInfo", + "path-parameters": { + "problemId": "commons.ProblemId", + "problemVersion": "integer" } }, - "getGeneratedTestCaseTemplateFile": { + "getExpectedResult": { "auth": true, - "path": "/generated-test-case-template-file", + "path": "/expected-result/{problemId}", "method": "POST", - "response": "map", + "response": "commons.TestCaseWithExpectedResult", + "path-parameters": { + "problemId": "commons.ProblemId" + }, "request": { "body": { - "type": "GetGeneratedTestCaseTemplateFileRequest" + "type": "commons.TestCase" } } } - } - } - } - }, - "ProblemInfo/__package__.yml": { - "absoluteFilepath": "/DUMMY_PATH", - "rawContents": "types:\n ProblemInfo:\n properties:\n problemId: commons.ProblemId\n problemDescription: ProblemDescription\n problemName: string\n problemVersion: integer\n files: map\n inputParams: list\n outputType: commons.VariableType\n testcases: list\n methodName: string\n supportsCustomTestCases: boolean\n ProblemDescription:\n properties:\n boards: list\n ProblemDescriptionBoard:\n union:\n html: string\n variable: commons.VariableValue\n testCaseId: string\n ProblemFiles:\n properties:\n solutionFile: commons.FileInfo\n readOnlyFiles: list\n VariableTypeAndName:\n properties:\n variableType: commons.VariableType\n name: string\n CreateProblemRequest:\n properties:\n problemName: string\n problemDescription: ProblemDescription\n files: map\n inputParams: list\n outputType: commons.VariableType\n testcases: list\n methodName: string\n CreateProblemResponse:\n union:\n success: commons.ProblemId\n error: CreateProblemError\n CreateProblemError:\n union:\n generic: GenericCreateProblemError\n GenericCreateProblemError:\n properties:\n message: string\n type: string\n stacktrace: string\n UpdateProblemResponse:\n properties:\n problemVersion: integer\n GetDefaultStarterFilesRequest:\n properties:\n inputParams: list\n outputType: commons.VariableType\n methodName: string\n GetDefaultStarterFilesResponse:\n properties:\n files: map\nimports:\n commons: ../commons/__package__.yml\nservice:\n auth: false\n base-path: ''\n endpoints:\n getProblems:\n auth: true\n path: /problem-info\n method: GET\n response: list\n getLatestProblem:\n auth: true\n path: /problem-info/{problemId}\n method: GET\n response: ProblemInfo\n path-parameters:\n problemId: commons.ProblemId\n getProblemVersion:\n auth: true\n path: /problem-info/{problemId}/version/{problemVersion}\n method: GET\n response: ProblemInfo\n path-parameters:\n problemId: commons.ProblemId\n problemVersion: integer\n getExpectedResult:\n auth: true\n path: /expected-result/{problemId}\n method: POST\n response: commons.TestCaseWithExpectedResult\n path-parameters:\n problemId: commons.ProblemId\n request:\n body:\n type: commons.TestCase\n", - "contents": { + } + }, "types": { "ProblemInfo": { "properties": { @@ -1579,22 +1624,34 @@ }, "imports": { "commons": "../commons/__package__.yml" - }, + } + } + }, + "ProblemInfoServicV2/__package__.yml": { + "absoluteFilepath": "/DUMMY_PATH", + "rawContents": "service:\n auth: false\n base-path: /problems-v2\n endpoints:\n getLightweightProblems:\n auth: true\n path: /lightweight-problem-info\n method: GET\n response: list\n getProblems:\n auth: true\n path: /problem-info\n method: GET\n response: list\n getLatestProblem:\n auth: true\n path: /problem-info/{problemId}\n method: GET\n response: ProblemInfoV2\n path-parameters:\n problemId: commons.ProblemId\n getProblemVersion:\n auth: true\n path: /problem-info/{problemId}/version/{problemVersion}\n method: GET\n response: ProblemInfoV2\n path-parameters:\n problemId: commons.ProblemId\n problemVersion: integer\ntypes:\n TestCaseTemplateId:\n type: string\n TestCaseId:\n type: string\n ParameterId:\n type: string\n ProblemInfoV2:\n properties:\n problemId: commons.ProblemId\n problemDescription: problem.ProblemDescription\n problemName: string\n problemVersion: integer\n supportedLanguages: set\n customFiles: CustomFiles\n generatedFiles: GeneratedFiles\n customTestCaseTemplates: list\n testcases: list\n isPublic: boolean\n LightweightProblemInfoV2:\n properties:\n problemId: commons.ProblemId\n problemName: string\n problemVersion: integer\n variableTypes: set\n CreateProblemRequestV2:\n properties:\n problemName: string\n problemDescription: problem.ProblemDescription\n customFiles: CustomFiles\n customTestCaseTemplates: list\n testcases: list\n supportedLanguages: set\n isPublic: boolean\n TestCaseV2:\n properties:\n metadata: TestCaseMetadata\n implementation: TestCaseImplementationReference\n arguments: map\n expects: optional\n TestCaseExpects:\n properties:\n expectedStdout: optional\n TestCaseImplementationReference:\n union:\n templateId: TestCaseTemplateId\n implementation: TestCaseImplementation\n BasicTestCaseTemplate:\n properties:\n templateId: TestCaseTemplateId\n name: string\n description: TestCaseImplementationDescription\n expectedValueParameterId: ParameterId\n TestCaseTemplate:\n properties:\n templateId: TestCaseTemplateId\n name: string\n implementation: TestCaseImplementation\n TestCaseImplementation:\n properties:\n description: TestCaseImplementationDescription\n function: TestCaseFunction\n TestCaseFunction:\n union:\n withActualResult: TestCaseWithActualResultImplementation\n custom: VoidFunctionDefinition\n TestCaseWithActualResultImplementation:\n properties:\n getActualResult: NonVoidFunctionDefinition\n assertCorrectnessCheck: AssertCorrectnessCheck\n VoidFunctionDefinition:\n properties:\n parameters: list\n code: FunctionImplementationForMultipleLanguages\n Parameter:\n properties:\n parameterId: ParameterId\n name: string\n variableType: commons.VariableType\n NonVoidFunctionDefinition:\n properties:\n signature: NonVoidFunctionSignature\n code: FunctionImplementationForMultipleLanguages\n VoidFunctionSignature:\n properties:\n parameters: list\n NonVoidFunctionSignature:\n properties:\n parameters: list\n returnType: commons.VariableType\n VoidFunctionSignatureThatTakesActualResult:\n properties:\n parameters: list\n actualResultType: commons.VariableType\n AssertCorrectnessCheck:\n union:\n deepEquality: DeepEqualityCorrectnessCheck\n custom: VoidFunctionDefinitionThatTakesActualResult\n DeepEqualityCorrectnessCheck:\n properties:\n expectedValueParameterId: ParameterId\n VoidFunctionDefinitionThatTakesActualResult:\n properties:\n additionalParameters: list\n code: FunctionImplementationForMultipleLanguages\n TestCaseImplementationDescription:\n properties:\n boards: list\n TestCaseImplementationDescriptionBoard:\n union:\n html: string\n paramId: ParameterId\n TestCaseMetadata:\n properties:\n id: TestCaseId\n name: string\n hidden: boolean\n FunctionImplementationForMultipleLanguages:\n properties:\n codeByLanguage: map\n FunctionImplementation:\n properties:\n impl: string;\n imports: optional;\n GeneratedFiles:\n properties:\n generatedTestCaseFiles: map\n generatedTemplateFiles: map\n other: map\n CustomFiles:\n union:\n basic: BasicCustomFiles\n custom: map\n BasicCustomFiles:\n properties:\n methodName: string\n signature: NonVoidFunctionSignature\n additionalFiles: map\n basicTestCaseTemplate: BasicTestCaseTemplate\n Files:\n properties:\n files: list\n FileInfoV2:\n properties:\n filename: string\n directory: string\n contents: string\n editable: boolean\n DefaultProvidedFile:\n properties:\n file: FileInfoV2\n relatedTypes: list\n GetBasicSolutionFileRequest:\n properties:\n methodName: string\n signature: NonVoidFunctionSignature\n GetBasicSolutionFileResponse:\n properties:\n solutionFileByLanguage: map\n GetFunctionSignatureRequest:\n properties:\n functionSignature: FunctionSignature\n FunctionSignature:\n union:\n void: VoidFunctionSignature\n nonVoid: NonVoidFunctionSignature\n voidThatTakesActualResult:\n type: VoidFunctionSignatureThatTakesActualResult\n docs: >-\n Useful when specifying custom grading for a testcase where\n actualResult is defined.\n GetFunctionSignatureResponse:\n properties:\n functionByLanguage: map\n GetDefaultProvidedFilesResponse:\n properties:\n filesByLanguage: map>\n GetGeneratedTestCaseFileRequest:\n properties:\n template: optional\n testCase: TestCaseV2\n GetGeneratedTestCaseTemplateFileRequest:\n properties:\n template: TestCaseTemplate\nimports:\n commons: ../commons/__package__.yml\n problem: ../ProblemInfo/__package__.yml\n", + "contents": { "service": { "auth": false, - "base-path": "", + "base-path": "/problems-v2", "endpoints": { + "getLightweightProblems": { + "auth": true, + "path": "/lightweight-problem-info", + "method": "GET", + "response": "list" + }, "getProblems": { "auth": true, "path": "/problem-info", "method": "GET", - "response": "list" + "response": "list" }, "getLatestProblem": { "auth": true, "path": "/problem-info/{problemId}", "method": "GET", - "response": "ProblemInfo", + "response": "ProblemInfoV2", "path-parameters": { "problemId": "commons.ProblemId" } @@ -1603,34 +1660,14 @@ "auth": true, "path": "/problem-info/{problemId}/version/{problemVersion}", "method": "GET", - "response": "ProblemInfo", + "response": "ProblemInfoV2", "path-parameters": { "problemId": "commons.ProblemId", "problemVersion": "integer" } - }, - "getExpectedResult": { - "auth": true, - "path": "/expected-result/{problemId}", - "method": "POST", - "response": "commons.TestCaseWithExpectedResult", - "path-parameters": { - "problemId": "commons.ProblemId" - }, - "request": { - "body": { - "type": "commons.TestCase" - } - } } } - } - } - }, - "ProblemInfoServicV2/__package__.yml": { - "absoluteFilepath": "/DUMMY_PATH", - "rawContents": "types:\n TestCaseTemplateId:\n type: string\n TestCaseId:\n type: string\n ParameterId:\n type: string\n ProblemInfoV2:\n properties:\n problemId: commons.ProblemId\n problemDescription: problem.ProblemDescription\n problemName: string\n problemVersion: integer\n supportedLanguages: set\n customFiles: CustomFiles\n generatedFiles: GeneratedFiles\n customTestCaseTemplates: list\n testcases: list\n isPublic: boolean\n LightweightProblemInfoV2:\n properties:\n problemId: commons.ProblemId\n problemName: string\n problemVersion: integer\n variableTypes: set\n CreateProblemRequestV2:\n properties:\n problemName: string\n problemDescription: problem.ProblemDescription\n customFiles: CustomFiles\n customTestCaseTemplates: list\n testcases: list\n supportedLanguages: set\n isPublic: boolean\n TestCaseV2:\n properties:\n metadata: TestCaseMetadata\n implementation: TestCaseImplementationReference\n arguments: map\n expects: optional\n TestCaseExpects:\n properties:\n expectedStdout: optional\n TestCaseImplementationReference:\n union:\n templateId: TestCaseTemplateId\n implementation: TestCaseImplementation\n BasicTestCaseTemplate:\n properties:\n templateId: TestCaseTemplateId\n name: string\n description: TestCaseImplementationDescription\n expectedValueParameterId: ParameterId\n TestCaseTemplate:\n properties:\n templateId: TestCaseTemplateId\n name: string\n implementation: TestCaseImplementation\n TestCaseImplementation:\n properties:\n description: TestCaseImplementationDescription\n function: TestCaseFunction\n TestCaseFunction:\n union:\n withActualResult: TestCaseWithActualResultImplementation\n custom: VoidFunctionDefinition\n TestCaseWithActualResultImplementation:\n properties:\n getActualResult: NonVoidFunctionDefinition\n assertCorrectnessCheck: AssertCorrectnessCheck\n VoidFunctionDefinition:\n properties:\n parameters: list\n code: FunctionImplementationForMultipleLanguages\n Parameter:\n properties:\n parameterId: ParameterId\n name: string\n variableType: commons.VariableType\n NonVoidFunctionDefinition:\n properties:\n signature: NonVoidFunctionSignature\n code: FunctionImplementationForMultipleLanguages\n VoidFunctionSignature:\n properties:\n parameters: list\n NonVoidFunctionSignature:\n properties:\n parameters: list\n returnType: commons.VariableType\n VoidFunctionSignatureThatTakesActualResult:\n properties:\n parameters: list\n actualResultType: commons.VariableType\n AssertCorrectnessCheck:\n union:\n deepEquality: DeepEqualityCorrectnessCheck\n custom: VoidFunctionDefinitionThatTakesActualResult\n DeepEqualityCorrectnessCheck:\n properties:\n expectedValueParameterId: ParameterId\n VoidFunctionDefinitionThatTakesActualResult:\n properties:\n additionalParameters: list\n code: FunctionImplementationForMultipleLanguages\n TestCaseImplementationDescription:\n properties:\n boards: list\n TestCaseImplementationDescriptionBoard:\n union:\n html: string\n paramId: ParameterId\n TestCaseMetadata:\n properties:\n id: TestCaseId\n name: string\n hidden: boolean\n FunctionImplementationForMultipleLanguages:\n properties:\n codeByLanguage: map\n FunctionImplementation:\n properties:\n impl: string;\n imports: optional;\n GeneratedFiles:\n properties:\n generatedTestCaseFiles: map\n generatedTemplateFiles: map\n other: map\n CustomFiles:\n union:\n basic: BasicCustomFiles\n custom: map\n BasicCustomFiles:\n properties:\n methodName: string\n signature: NonVoidFunctionSignature\n additionalFiles: map\n basicTestCaseTemplate: BasicTestCaseTemplate\n Files:\n properties:\n files: list\n FileInfoV2:\n properties:\n filename: string\n directory: string\n contents: string\n editable: boolean\n DefaultProvidedFile:\n properties:\n file: FileInfoV2\n relatedTypes: list\n GetBasicSolutionFileRequest:\n properties:\n methodName: string\n signature: NonVoidFunctionSignature\n GetBasicSolutionFileResponse:\n properties:\n solutionFileByLanguage: map\n GetFunctionSignatureRequest:\n properties:\n functionSignature: FunctionSignature\n FunctionSignature:\n union:\n void: VoidFunctionSignature\n nonVoid: NonVoidFunctionSignature\n voidThatTakesActualResult:\n type: VoidFunctionSignatureThatTakesActualResult\n docs: >-\n Useful when specifying custom grading for a testcase where\n actualResult is defined.\n GetFunctionSignatureResponse:\n properties:\n functionByLanguage: map\n GetDefaultProvidedFilesResponse:\n properties:\n filesByLanguage: map>\n GetGeneratedTestCaseFileRequest:\n properties:\n template: optional\n testCase: TestCaseV2\n GetGeneratedTestCaseTemplateFileRequest:\n properties:\n template: TestCaseTemplate\nimports:\n commons: ../commons/__package__.yml\n problem: ../ProblemInfo/__package__.yml\nservice:\n auth: false\n base-path: ''\n endpoints:\n getLightweightProblems:\n auth: true\n path: /lightweight-problem-info\n method: GET\n response: list\n getProblems:\n auth: true\n path: /problem-info\n method: GET\n response: list\n getLatestProblem:\n auth: true\n path: /problem-info/{problemId}\n method: GET\n response: ProblemInfoV2\n path-parameters:\n problemId: commons.ProblemId\n getProblemVersion:\n auth: true\n path: /problem-info/{problemId}/version/{problemVersion}\n method: GET\n response: ProblemInfoV2\n path-parameters:\n problemId: commons.ProblemId\n problemVersion: integer\n", - "contents": { + }, "types": { "TestCaseTemplateId": { "type": "string" @@ -1899,50 +1936,95 @@ "imports": { "commons": "../commons/__package__.yml", "problem": "../ProblemInfo/__package__.yml" - }, + } + } + }, + "SubmissionInfo/__package__.yml": { + "absoluteFilepath": "/DUMMY_PATH", + "rawContents": "service:\n auth: false\n base-path: /submissions\n endpoints:\n getSubmissionState:\n auth: true\n path: /{submissionId}\n method: GET\n response: SubmissionState\n path-parameters:\n submissionId: SubmissionId\n getSubmissionStateV2:\n auth: true\n path: /v2/{submissionId}\n method: GET\n response: SubmissionStateV2\n path-parameters:\n submissionId: SubmissionId\n getTraceResponsesPage:\n auth: true\n path: /trace-respose/{submissionId}/testCase/{testCaseId}\n method: POST\n response: TraceResponsesPage\n path-parameters:\n submissionId: SubmissionId\n testCaseId: string\n request:\n body:\n type: GetTraceResponsesPageRequest\n getTraceResponsesV2Page:\n auth: true\n path: /trace-response-v2/{submissionId}/testCase/{testCaseId}\n method: POST\n response: TraceResponsesPageV2\n path-parameters:\n submissionId: SubmissionId\n testCaseId: problemV2.TestCaseId\n request:\n body:\n type: GetTraceResponsesPageRequest\n getTraceResponsesPageForWorkspace:\n auth: true\n path: /workspace-trace-response/{submissionId}\n method: POST\n response: TraceResponsesPage\n path-parameters:\n submissionId: SubmissionId\n request:\n body:\n type: GetTraceResponsesPageRequest\n getTraceResponsesV2PageForWorkspace:\n auth: true\n path: /workspace-trace-response-v2/{submissionId}\n method: POST\n response: TraceResponsesPageV2\n path-parameters:\n submissionId: SubmissionId\n request:\n body:\n type: GetTraceResponsesPageRequest\ntypes:\n SubmissionId:\n type: string\n ShareId:\n type: string\n SubmissionRequest:\n union:\n initializeProblemRequest: InitializeProblemRequest\n initializeWorkspaceRequest: commons.EmptyObject\n submitV2: SubmitRequestV2\n workspaceSubmit: WorkspaceSubmitRequest\n stop: StopRequest\n InitializeProblemRequest:\n properties:\n problemId: commons.ProblemId\n problemVersion: optional\n SubmitRequestV2:\n properties:\n submissionId: SubmissionId\n language: commons.Language\n submissionFiles: list\n problemId: commons.ProblemId\n problemVersion: optional\n userId: optional\n WorkspaceSubmitRequest:\n properties:\n submissionId: SubmissionId\n language: commons.Language\n submissionFiles: list\n userId: optional\n SubmissionFileInfo:\n properties:\n directory: string\n filename: string\n contents: string\n SubmissionTypeEnum:\n enum:\n - TEST\n StopRequest:\n properties:\n submissionId: SubmissionId\n SubmissionResponse:\n union:\n serverInitialized: commons.EmptyObject\n problemInitialized: commons.ProblemId\n workspaceInitialized: commons.EmptyObject\n serverErrored: ExceptionInfo\n codeExecutionUpdate: CodeExecutionUpdate\n terminated: TerminatedResponse\n CodeExecutionUpdate:\n union:\n buildingExecutor:\n type: BuildingExecutorResponse\n docs: >-\n Statuses if an executor for the session isn't ready (Before\n RunningResponse).\n running:\n type: RunningResponse\n docs: Sent once a test submission is executing.\n errored:\n type: ErroredResponse\n docs: Sent if a submission cannot be run (i.e. Compile Error).\n stopped:\n type: StoppedResponse\n docs: Sent if a submission is stopped.\n graded:\n type: GradedResponse\n docs: Graded testcases without trace information.\n gradedV2:\n type: GradedResponseV2\n docs: Graded submission for v2 problems.\n workspaceRan:\n type: WorkspaceRanResponse\n docs: Workspace run without trace information.\n recording:\n type: RecordingResponseNotification\n docs: Gives progress about what is being recorded.\n recorded:\n type: RecordedResponseNotification\n docs: Graded testcases with trace information.\n invalidRequest:\n type: InvalidRequestResponse\n docs: Sent if an invalid request is sent for a submission.\n finished:\n type: FinishedResponse\n docs: Sent once a submission is graded and fully recorded.\n BuildingExecutorResponse:\n properties:\n submissionId: SubmissionId\n status: ExecutionSessionStatus\n RunningResponse:\n properties:\n submissionId: SubmissionId\n state: RunningSubmissionState\n RunningSubmissionState:\n enum:\n - QUEUEING_SUBMISSION\n - KILLING_HISTORICAL_SUBMISSIONS\n - WRITING_SUBMISSION_TO_FILE\n - COMPILING_SUBMISSION\n - RUNNING_SUBMISSION\n ErroredResponse:\n properties:\n submissionId: SubmissionId\n errorInfo: ErrorInfo\n ErrorInfo:\n union:\n compileError: CompileError\n runtimeError:\n type: RuntimeError\n docs: >\n If the submission cannot be executed and throws a runtime error before\n getting to any of the testcases.\n internalError:\n type: InternalError\n docs: |\n If the trace backend encounters an unexpected error.\n CompileError:\n properties:\n message: string\n RuntimeError:\n properties:\n message: string\n InternalError:\n properties:\n exceptionInfo: ExceptionInfo\n StoppedResponse:\n properties:\n submissionId: SubmissionId\n WorkspaceRanResponse:\n properties:\n submissionId: SubmissionId\n runDetails: WorkspaceRunDetails\n WorkspaceRunDetails:\n properties:\n exceptionV2: optional\n exception: optional\n stdout: string\n GradedResponse:\n properties:\n submissionId: SubmissionId\n testCases: map\n GradedResponseV2:\n properties:\n submissionId: SubmissionId\n testCases: map\n TestCaseGrade:\n union:\n hidden: TestCaseHiddenGrade\n nonHidden: TestCaseNonHiddenGrade\n TestCaseHiddenGrade:\n properties:\n passed: boolean\n TestCaseNonHiddenGrade:\n properties:\n passed: boolean\n actualResult: optional\n exception: optional\n stdout: string\n RecordedResponseNotification:\n properties:\n submissionId: SubmissionId\n traceResponsesSize: integer\n testCaseId: optional\n RecordingResponseNotification:\n properties:\n submissionId: SubmissionId\n testCaseId: optional\n lineNumber: integer\n lightweightStackInfo: LightweightStackframeInformation\n tracedFile: optional\n LightweightStackframeInformation:\n properties:\n numStackFrames: integer\n topStackFrameMethodName: string\n TestCaseResultWithStdout:\n properties:\n result: TestCaseResult\n stdout: string\n TestCaseResult:\n properties:\n expectedResult: commons.VariableValue\n actualResult: ActualResult\n passed: boolean\n ActualResult:\n union:\n value: commons.VariableValue\n exception: ExceptionInfo\n exceptionV2: ExceptionV2\n ExceptionV2:\n union:\n generic: ExceptionInfo\n timeout: commons.EmptyObject\n ExceptionInfo:\n properties:\n exceptionType: string\n exceptionMessage: string\n exceptionStacktrace: string\n InvalidRequestResponse:\n properties:\n request: SubmissionRequest\n cause: InvalidRequestCause\n InvalidRequestCause:\n union:\n submissionIdNotFound:\n type: SubmissionIdNotFound\n docs: The submission request references a submission id that doesn't exist.\n customTestCasesUnsupported:\n type: CustomTestCasesUnsupported\n unexpectedLanguage:\n type: UnexpectedLanguageError\n docs: The submission request was routed to an incorrect language executor.\n ExistingSubmissionExecuting:\n properties:\n submissionId: SubmissionId\n SubmissionIdNotFound:\n properties:\n missingSubmissionId: SubmissionId\n CustomTestCasesUnsupported:\n properties:\n problemId: commons.ProblemId\n submissionId: SubmissionId\n UnexpectedLanguageError:\n properties:\n expectedLanguage: commons.Language\n actualLanguage: commons.Language\n TerminatedResponse:\n properties: {}\n FinishedResponse:\n properties:\n submissionId: SubmissionId\n StdoutResponse:\n properties:\n submissionId: SubmissionId\n stdout: string\n StderrResponse:\n properties:\n submissionId: SubmissionId\n stderr: string\n TraceResponse:\n properties:\n submissionId: SubmissionId\n lineNumber: integer\n returnValue: optional\n expressionLocation: optional\n stack: StackInformation\n stdout: optional\n TraceResponseV2:\n properties:\n submissionId: SubmissionId\n lineNumber: integer\n file: TracedFile\n returnValue: optional\n expressionLocation: optional\n stack: StackInformation\n stdout: optional\n TracedFile:\n properties:\n filename: string\n directory: string\n ExpressionLocation:\n properties:\n start: integer\n offset: integer\n StackInformation:\n properties:\n numStackFrames: integer\n topStackFrame: optional\n StackFrame:\n properties:\n methodName: string\n lineNumber: integer\n scopes: list\n Scope:\n properties:\n variables: map\n ExecutionSessionResponse:\n properties:\n sessionId: string\n executionSessionUrl: optional\n language: commons.Language\n status: ExecutionSessionStatus\n ExecutionSessionStatus:\n enum:\n - CREATING_CONTAINER\n - PROVISIONING_CONTAINER\n - PENDING_CONTAINER\n - RUNNING_CONTAINER\n - LIVE_CONTAINER\n - FAILED_TO_LAUNCH\n SubmissionStateV2:\n properties:\n timeSubmitted: datetime\n language: commons.Language\n submissionFiles: list\n submissionStatus: SubmissionStatusV2\n SubmissionStatusV2:\n union:\n test: TestSubmissionStatusV2\n workspace: WorkspaceSubmissionStatusV2\n TestSubmissionStatusV2:\n properties:\n updates: list\n problemId: commons.ProblemId\n problemVersion: integer\n problemInfo: problemV2.ProblemInfoV2\n WorkspaceSubmissionStatusV2:\n properties:\n updates: list\n TestSubmissionUpdate:\n properties:\n updateTime: datetime\n updateInfo: TestSubmissionUpdateInfo\n TestSubmissionUpdateInfo:\n union:\n running: RunningSubmissionState\n stopped: commons.EmptyObject\n errored: ErrorInfo\n gradedTestCase: GradedTestCaseUpdate\n recordedTestCase: RecordedTestCaseUpdate\n finished: commons.EmptyObject\n WorkspaceSubmissionUpdate:\n properties:\n updateTime: datetime\n updateInfo: WorkspaceSubmissionUpdateInfo\n WorkspaceSubmissionUpdateInfo:\n union:\n running: RunningSubmissionState\n ran: WorkspaceRunDetails\n stopped: commons.EmptyObject\n traced: commons.EmptyObject\n tracedV2: WorkspaceTracedUpdate\n errored: ErrorInfo\n finished: commons.EmptyObject\n GradedTestCaseUpdate:\n properties:\n testCaseId: problemV2.TestCaseId\n grade: TestCaseGrade\n RecordedTestCaseUpdate:\n properties:\n testCaseId: problemV2.TestCaseId\n traceResponsesSize: integer\n WorkspaceTracedUpdate:\n properties:\n traceResponsesSize: integer\n SubmissionState:\n properties:\n timeSubmitted: optional\n submission: string\n language: commons.Language\n submissionTypeState: SubmissionTypeState\n SubmissionTypeState:\n union:\n test: TestSubmissionState\n workspace: WorkspaceSubmissionState\n WorkspaceSubmissionState:\n properties:\n status: WorkspaceSubmissionStatus\n WorkspaceSubmissionStatus:\n union:\n stopped: commons.EmptyObject\n errored: ErrorInfo\n running: RunningSubmissionState\n ran: WorkspaceRunDetails\n traced: WorkspaceRunDetails\n TestSubmissionState:\n properties:\n problemId: commons.ProblemId\n defaultTestCases: list\n customTestCases: list\n status: TestSubmissionStatus\n TestSubmissionStatus:\n union:\n stopped: commons.EmptyObject\n errored: ErrorInfo\n running: RunningSubmissionState\n testCaseIdToState: map\n SubmissionStatusForTestCase:\n union:\n graded: TestCaseResultWithStdout\n gradedV2: TestCaseGrade\n traced: TracedTestCase\n TracedTestCase:\n properties:\n result: TestCaseResultWithStdout\n traceResponsesSize: integer\n TraceResponsesPage:\n properties:\n offset:\n type: optional\n docs: |\n If present, use this to load subseqent pages.\n The offset is the id of the next trace response to load.\n traceResponses: list\n TraceResponsesPageV2:\n properties:\n offset:\n type: optional\n docs: |\n If present, use this to load subseqent pages.\n The offset is the id of the next trace response to load.\n traceResponses: list\n GetTraceResponsesPageRequest:\n properties:\n offset:\n type: optional\n WorkspaceStarterFilesResponse:\n properties:\n files: map\n WorkspaceStarterFilesResponseV2:\n properties:\n filesByLanguage: map\n WorkspaceFiles:\n properties:\n mainFile: commons.FileInfo\n readOnlyFiles: list\n ExecutionSessionsState:\n properties:\n states: map\n numWarmingInstances: optional\n warmingSessionIds: list\n ExecutionSessionState:\n properties:\n lastTimeContacted: optional\n sessionId: string\n isWarmInstance: boolean\n awsTaskId: optional\n language: commons.Language\n status: ExecutionSessionStatus\nimports:\n commons: ../commons/__package__.yml\n problemV2: ../ProblemInfoServicV2/__package__.yml\n", + "contents": { "service": { "auth": false, - "base-path": "", + "base-path": "/submissions", "endpoints": { - "getLightweightProblems": { + "getSubmissionState": { "auth": true, - "path": "/lightweight-problem-info", + "path": "/{submissionId}", "method": "GET", - "response": "list" + "response": "SubmissionState", + "path-parameters": { + "submissionId": "SubmissionId" + } }, - "getProblems": { + "getSubmissionStateV2": { "auth": true, - "path": "/problem-info", + "path": "/v2/{submissionId}", "method": "GET", - "response": "list" + "response": "SubmissionStateV2", + "path-parameters": { + "submissionId": "SubmissionId" + } }, - "getLatestProblem": { + "getTraceResponsesPage": { "auth": true, - "path": "/problem-info/{problemId}", - "method": "GET", - "response": "ProblemInfoV2", + "path": "/trace-respose/{submissionId}/testCase/{testCaseId}", + "method": "POST", + "response": "TraceResponsesPage", "path-parameters": { - "problemId": "commons.ProblemId" + "submissionId": "SubmissionId", + "testCaseId": "string" + }, + "request": { + "body": { + "type": "GetTraceResponsesPageRequest" + } } }, - "getProblemVersion": { + "getTraceResponsesV2Page": { "auth": true, - "path": "/problem-info/{problemId}/version/{problemVersion}", - "method": "GET", - "response": "ProblemInfoV2", + "path": "/trace-response-v2/{submissionId}/testCase/{testCaseId}", + "method": "POST", + "response": "TraceResponsesPageV2", "path-parameters": { - "problemId": "commons.ProblemId", - "problemVersion": "integer" + "submissionId": "SubmissionId", + "testCaseId": "problemV2.TestCaseId" + }, + "request": { + "body": { + "type": "GetTraceResponsesPageRequest" + } + } + }, + "getTraceResponsesPageForWorkspace": { + "auth": true, + "path": "/workspace-trace-response/{submissionId}", + "method": "POST", + "response": "TraceResponsesPage", + "path-parameters": { + "submissionId": "SubmissionId" + }, + "request": { + "body": { + "type": "GetTraceResponsesPageRequest" + } + } + }, + "getTraceResponsesV2PageForWorkspace": { + "auth": true, + "path": "/workspace-trace-response-v2/{submissionId}", + "method": "POST", + "response": "TraceResponsesPageV2", + "path-parameters": { + "submissionId": "SubmissionId" + }, + "request": { + "body": { + "type": "GetTraceResponsesPageRequest" + } } } } - } - } - }, - "SubmissionInfo/__package__.yml": { - "absoluteFilepath": "/DUMMY_PATH", - "rawContents": "types:\n SubmissionId:\n type: string\n ShareId:\n type: string\n SubmissionRequest:\n union:\n initializeProblemRequest: InitializeProblemRequest\n initializeWorkspaceRequest: commons.EmptyObject\n submitV2: SubmitRequestV2\n workspaceSubmit: WorkspaceSubmitRequest\n stop: StopRequest\n InitializeProblemRequest:\n properties:\n problemId: commons.ProblemId\n problemVersion: optional\n SubmitRequestV2:\n properties:\n submissionId: SubmissionId\n language: commons.Language\n submissionFiles: list\n problemId: commons.ProblemId\n problemVersion: optional\n userId: optional\n WorkspaceSubmitRequest:\n properties:\n submissionId: SubmissionId\n language: commons.Language\n submissionFiles: list\n userId: optional\n SubmissionFileInfo:\n properties:\n directory: string\n filename: string\n contents: string\n SubmissionTypeEnum:\n enum:\n - TEST\n StopRequest:\n properties:\n submissionId: SubmissionId\n SubmissionResponse:\n union:\n serverInitialized: commons.EmptyObject\n problemInitialized: commons.ProblemId\n workspaceInitialized: commons.EmptyObject\n serverErrored: ExceptionInfo\n codeExecutionUpdate: CodeExecutionUpdate\n terminated: TerminatedResponse\n CodeExecutionUpdate:\n union:\n buildingExecutor:\n type: BuildingExecutorResponse\n docs: >-\n Statuses if an executor for the session isn't ready (Before\n RunningResponse).\n running:\n type: RunningResponse\n docs: Sent once a test submission is executing.\n errored:\n type: ErroredResponse\n docs: Sent if a submission cannot be run (i.e. Compile Error).\n stopped:\n type: StoppedResponse\n docs: Sent if a submission is stopped.\n graded:\n type: GradedResponse\n docs: Graded testcases without trace information.\n gradedV2:\n type: GradedResponseV2\n docs: Graded submission for v2 problems.\n workspaceRan:\n type: WorkspaceRanResponse\n docs: Workspace run without trace information.\n recording:\n type: RecordingResponseNotification\n docs: Gives progress about what is being recorded.\n recorded:\n type: RecordedResponseNotification\n docs: Graded testcases with trace information.\n invalidRequest:\n type: InvalidRequestResponse\n docs: Sent if an invalid request is sent for a submission.\n finished:\n type: FinishedResponse\n docs: Sent once a submission is graded and fully recorded.\n BuildingExecutorResponse:\n properties:\n submissionId: SubmissionId\n status: ExecutionSessionStatus\n RunningResponse:\n properties:\n submissionId: SubmissionId\n state: RunningSubmissionState\n RunningSubmissionState:\n enum:\n - QUEUEING_SUBMISSION\n - KILLING_HISTORICAL_SUBMISSIONS\n - WRITING_SUBMISSION_TO_FILE\n - COMPILING_SUBMISSION\n - RUNNING_SUBMISSION\n ErroredResponse:\n properties:\n submissionId: SubmissionId\n errorInfo: ErrorInfo\n ErrorInfo:\n union:\n compileError: CompileError\n runtimeError:\n type: RuntimeError\n docs: >\n If the submission cannot be executed and throws a runtime error before\n getting to any of the testcases.\n internalError:\n type: InternalError\n docs: |\n If the trace backend encounters an unexpected error.\n CompileError:\n properties:\n message: string\n RuntimeError:\n properties:\n message: string\n InternalError:\n properties:\n exceptionInfo: ExceptionInfo\n StoppedResponse:\n properties:\n submissionId: SubmissionId\n WorkspaceRanResponse:\n properties:\n submissionId: SubmissionId\n runDetails: WorkspaceRunDetails\n WorkspaceRunDetails:\n properties:\n exceptionV2: optional\n exception: optional\n stdout: string\n GradedResponse:\n properties:\n submissionId: SubmissionId\n testCases: map\n GradedResponseV2:\n properties:\n submissionId: SubmissionId\n testCases: map\n TestCaseGrade:\n union:\n hidden: TestCaseHiddenGrade\n nonHidden: TestCaseNonHiddenGrade\n TestCaseHiddenGrade:\n properties:\n passed: boolean\n TestCaseNonHiddenGrade:\n properties:\n passed: boolean\n actualResult: optional\n exception: optional\n stdout: string\n RecordedResponseNotification:\n properties:\n submissionId: SubmissionId\n traceResponsesSize: integer\n testCaseId: optional\n RecordingResponseNotification:\n properties:\n submissionId: SubmissionId\n testCaseId: optional\n lineNumber: integer\n lightweightStackInfo: LightweightStackframeInformation\n tracedFile: optional\n LightweightStackframeInformation:\n properties:\n numStackFrames: integer\n topStackFrameMethodName: string\n TestCaseResultWithStdout:\n properties:\n result: TestCaseResult\n stdout: string\n TestCaseResult:\n properties:\n expectedResult: commons.VariableValue\n actualResult: ActualResult\n passed: boolean\n ActualResult:\n union:\n value: commons.VariableValue\n exception: ExceptionInfo\n exceptionV2: ExceptionV2\n ExceptionV2:\n union:\n generic: ExceptionInfo\n timeout: commons.EmptyObject\n ExceptionInfo:\n properties:\n exceptionType: string\n exceptionMessage: string\n exceptionStacktrace: string\n InvalidRequestResponse:\n properties:\n request: SubmissionRequest\n cause: InvalidRequestCause\n InvalidRequestCause:\n union:\n submissionIdNotFound:\n type: SubmissionIdNotFound\n docs: The submission request references a submission id that doesn't exist.\n customTestCasesUnsupported:\n type: CustomTestCasesUnsupported\n unexpectedLanguage:\n type: UnexpectedLanguageError\n docs: The submission request was routed to an incorrect language executor.\n ExistingSubmissionExecuting:\n properties:\n submissionId: SubmissionId\n SubmissionIdNotFound:\n properties:\n missingSubmissionId: SubmissionId\n CustomTestCasesUnsupported:\n properties:\n problemId: commons.ProblemId\n submissionId: SubmissionId\n UnexpectedLanguageError:\n properties:\n expectedLanguage: commons.Language\n actualLanguage: commons.Language\n TerminatedResponse:\n properties: {}\n FinishedResponse:\n properties:\n submissionId: SubmissionId\n StdoutResponse:\n properties:\n submissionId: SubmissionId\n stdout: string\n StderrResponse:\n properties:\n submissionId: SubmissionId\n stderr: string\n TraceResponse:\n properties:\n submissionId: SubmissionId\n lineNumber: integer\n returnValue: optional\n expressionLocation: optional\n stack: StackInformation\n stdout: optional\n TraceResponseV2:\n properties:\n submissionId: SubmissionId\n lineNumber: integer\n file: TracedFile\n returnValue: optional\n expressionLocation: optional\n stack: StackInformation\n stdout: optional\n TracedFile:\n properties:\n filename: string\n directory: string\n ExpressionLocation:\n properties:\n start: integer\n offset: integer\n StackInformation:\n properties:\n numStackFrames: integer\n topStackFrame: optional\n StackFrame:\n properties:\n methodName: string\n lineNumber: integer\n scopes: list\n Scope:\n properties:\n variables: map\n ExecutionSessionResponse:\n properties:\n sessionId: string\n executionSessionUrl: optional\n language: commons.Language\n status: ExecutionSessionStatus\n ExecutionSessionStatus:\n enum:\n - CREATING_CONTAINER\n - PROVISIONING_CONTAINER\n - PENDING_CONTAINER\n - RUNNING_CONTAINER\n - LIVE_CONTAINER\n - FAILED_TO_LAUNCH\n SubmissionStateV2:\n properties:\n timeSubmitted: datetime\n language: commons.Language\n submissionFiles: list\n submissionStatus: SubmissionStatusV2\n SubmissionStatusV2:\n union:\n test: TestSubmissionStatusV2\n workspace: WorkspaceSubmissionStatusV2\n TestSubmissionStatusV2:\n properties:\n updates: list\n problemId: commons.ProblemId\n problemVersion: integer\n problemInfo: problemV2.ProblemInfoV2\n WorkspaceSubmissionStatusV2:\n properties:\n updates: list\n TestSubmissionUpdate:\n properties:\n updateTime: datetime\n updateInfo: TestSubmissionUpdateInfo\n TestSubmissionUpdateInfo:\n union:\n running: RunningSubmissionState\n stopped: commons.EmptyObject\n errored: ErrorInfo\n gradedTestCase: GradedTestCaseUpdate\n recordedTestCase: RecordedTestCaseUpdate\n finished: commons.EmptyObject\n WorkspaceSubmissionUpdate:\n properties:\n updateTime: datetime\n updateInfo: WorkspaceSubmissionUpdateInfo\n WorkspaceSubmissionUpdateInfo:\n union:\n running: RunningSubmissionState\n ran: WorkspaceRunDetails\n stopped: commons.EmptyObject\n traced: commons.EmptyObject\n tracedV2: WorkspaceTracedUpdate\n errored: ErrorInfo\n finished: commons.EmptyObject\n GradedTestCaseUpdate:\n properties:\n testCaseId: problemV2.TestCaseId\n grade: TestCaseGrade\n RecordedTestCaseUpdate:\n properties:\n testCaseId: problemV2.TestCaseId\n traceResponsesSize: integer\n WorkspaceTracedUpdate:\n properties:\n traceResponsesSize: integer\n SubmissionState:\n properties:\n timeSubmitted: optional\n submission: string\n language: commons.Language\n submissionTypeState: SubmissionTypeState\n SubmissionTypeState:\n union:\n test: TestSubmissionState\n workspace: WorkspaceSubmissionState\n WorkspaceSubmissionState:\n properties:\n status: WorkspaceSubmissionStatus\n WorkspaceSubmissionStatus:\n union:\n stopped: commons.EmptyObject\n errored: ErrorInfo\n running: RunningSubmissionState\n ran: WorkspaceRunDetails\n traced: WorkspaceRunDetails\n TestSubmissionState:\n properties:\n problemId: commons.ProblemId\n defaultTestCases: list\n customTestCases: list\n status: TestSubmissionStatus\n TestSubmissionStatus:\n union:\n stopped: commons.EmptyObject\n errored: ErrorInfo\n running: RunningSubmissionState\n testCaseIdToState: map\n SubmissionStatusForTestCase:\n union:\n graded: TestCaseResultWithStdout\n gradedV2: TestCaseGrade\n traced: TracedTestCase\n TracedTestCase:\n properties:\n result: TestCaseResultWithStdout\n traceResponsesSize: integer\n TraceResponsesPage:\n properties:\n offset:\n type: optional\n docs: |\n If present, use this to load subseqent pages.\n The offset is the id of the next trace response to load.\n traceResponses: list\n TraceResponsesPageV2:\n properties:\n offset:\n type: optional\n docs: |\n If present, use this to load subseqent pages.\n The offset is the id of the next trace response to load.\n traceResponses: list\n GetTraceResponsesPageRequest:\n properties:\n offset:\n type: optional\n WorkspaceStarterFilesResponse:\n properties:\n files: map\n WorkspaceStarterFilesResponseV2:\n properties:\n filesByLanguage: map\n WorkspaceFiles:\n properties:\n mainFile: commons.FileInfo\n readOnlyFiles: list\n ExecutionSessionsState:\n properties:\n states: map\n numWarmingInstances: optional\n warmingSessionIds: list\n ExecutionSessionState:\n properties:\n lastTimeContacted: optional\n sessionId: string\n isWarmInstance: boolean\n awsTaskId: optional\n language: commons.Language\n status: ExecutionSessionStatus\nimports:\n commons: ../commons/__package__.yml\n problemV2: ../ProblemInfoServicV2/__package__.yml\nservice:\n auth: false\n base-path: ''\n endpoints:\n getSubmissionState:\n auth: true\n path: /{submissionId}\n method: GET\n response: SubmissionState\n path-parameters:\n submissionId: SubmissionId\n getSubmissionStateV2:\n auth: true\n path: /v2/{submissionId}\n method: GET\n response: SubmissionStateV2\n path-parameters:\n submissionId: SubmissionId\n getTraceResponsesPage:\n auth: true\n path: /trace-respose/{submissionId}/testCase/{testCaseId}\n method: POST\n response: TraceResponsesPage\n path-parameters:\n submissionId: SubmissionId\n testCaseId: string\n request:\n body:\n type: GetTraceResponsesPageRequest\n getTraceResponsesV2Page:\n auth: true\n path: /trace-response-v2/{submissionId}/testCase/{testCaseId}\n method: POST\n response: TraceResponsesPageV2\n path-parameters:\n submissionId: SubmissionId\n testCaseId: problemV2.TestCaseId\n request:\n body:\n type: GetTraceResponsesPageRequest\n getTraceResponsesPageForWorkspace:\n auth: true\n path: /workspace-trace-response/{submissionId}\n method: POST\n response: TraceResponsesPage\n path-parameters:\n submissionId: SubmissionId\n request:\n body:\n type: GetTraceResponsesPageRequest\n getTraceResponsesV2PageForWorkspace:\n auth: true\n path: /workspace-trace-response-v2/{submissionId}\n method: POST\n response: TraceResponsesPageV2\n path-parameters:\n submissionId: SubmissionId\n request:\n body:\n type: GetTraceResponsesPageRequest\n", - "contents": { + }, "types": { "SubmissionId": { "type": "string" @@ -2545,101 +2627,16 @@ "imports": { "commons": "../commons/__package__.yml", "problemV2": "../ProblemInfoServicV2/__package__.yml" - }, - "service": { - "auth": false, - "base-path": "", - "endpoints": { - "getSubmissionState": { - "auth": true, - "path": "/{submissionId}", - "method": "GET", - "response": "SubmissionState", - "path-parameters": { - "submissionId": "SubmissionId" - } - }, - "getSubmissionStateV2": { - "auth": true, - "path": "/v2/{submissionId}", - "method": "GET", - "response": "SubmissionStateV2", - "path-parameters": { - "submissionId": "SubmissionId" - } - }, - "getTraceResponsesPage": { - "auth": true, - "path": "/trace-respose/{submissionId}/testCase/{testCaseId}", - "method": "POST", - "response": "TraceResponsesPage", - "path-parameters": { - "submissionId": "SubmissionId", - "testCaseId": "string" - }, - "request": { - "body": { - "type": "GetTraceResponsesPageRequest" - } - } - }, - "getTraceResponsesV2Page": { - "auth": true, - "path": "/trace-response-v2/{submissionId}/testCase/{testCaseId}", - "method": "POST", - "response": "TraceResponsesPageV2", - "path-parameters": { - "submissionId": "SubmissionId", - "testCaseId": "problemV2.TestCaseId" - }, - "request": { - "body": { - "type": "GetTraceResponsesPageRequest" - } - } - }, - "getTraceResponsesPageForWorkspace": { - "auth": true, - "path": "/workspace-trace-response/{submissionId}", - "method": "POST", - "response": "TraceResponsesPage", - "path-parameters": { - "submissionId": "SubmissionId" - }, - "request": { - "body": { - "type": "GetTraceResponsesPageRequest" - } - } - }, - "getTraceResponsesV2PageForWorkspace": { - "auth": true, - "path": "/workspace-trace-response-v2/{submissionId}", - "method": "POST", - "response": "TraceResponsesPageV2", - "path-parameters": { - "submissionId": "SubmissionId" - }, - "request": { - "body": { - "type": "GetTraceResponsesPageRequest" - } - } - } - } } } }, "SysPropCrud/__package__.yml": { "absoluteFilepath": "/DUMMY_PATH", - "rawContents": "imports:\n commons: ../commons/__package__.yml\nservice:\n auth: false\n base-path: ''\n endpoints:\n setNumWarmInstances:\n auth: true\n path: /num-warm-instances/{language}/{numWarmInstances}\n method: PUT\n path-parameters:\n language: commons.Language\n numWarmInstances: integer\n getNumWarmInstances:\n auth: true\n path: /num-warm-instances\n method: GET\n response: map\n", + "rawContents": "service:\n auth: false\n base-path: /sysprop\n endpoints:\n setNumWarmInstances:\n auth: true\n path: /num-warm-instances/{language}/{numWarmInstances}\n method: PUT\n path-parameters:\n language: commons.Language\n numWarmInstances: integer\n getNumWarmInstances:\n auth: true\n path: /num-warm-instances\n method: GET\n response: map\nimports:\n commons: ../commons/__package__.yml\n", "contents": { - "imports": { - "commons": "../commons/__package__.yml" - }, "service": { "auth": false, - "base-path": "", + "base-path": "/sysprop", "endpoints": { "setNumWarmInstances": { "auth": true, @@ -2657,13 +2654,34 @@ "response": "map" } } + }, + "imports": { + "commons": "../commons/__package__.yml" } } }, "WorkspaceInfo/__package__.yml": { "absoluteFilepath": "/DUMMY_PATH", - "rawContents": "types:\n SubmissionId:\n type: string\n ShareId:\n type: string\n SubmissionRequest:\n union:\n initializeProblemRequest: InitializeProblemRequest\n initializeWorkspaceRequest: commons.EmptyObject\n submitV2: SubmitRequestV2\n workspaceSubmit: WorkspaceSubmitRequest\n stop: StopRequest\n InitializeProblemRequest:\n properties:\n problemId: commons.ProblemId\n problemVersion: optional\n SubmitRequestV2:\n properties:\n submissionId: SubmissionId\n language: commons.Language\n submissionFiles: list\n problemId: commons.ProblemId\n problemVersion: optional\n userId: optional\n WorkspaceSubmitRequest:\n properties:\n submissionId: SubmissionId\n language: commons.Language\n submissionFiles: list\n userId: optional\n SubmissionFileInfo:\n properties:\n directory: string\n filename: string\n contents: string\n SubmissionTypeEnum:\n enum:\n - TEST\n StopRequest:\n properties:\n submissionId: SubmissionId\n SubmissionResponse:\n union:\n serverInitialized: commons.EmptyObject\n problemInitialized: commons.ProblemId\n workspaceInitialized: commons.EmptyObject\n serverErrored: ExceptionInfo\n codeExecutionUpdate: CodeExecutionUpdate\n terminated: TerminatedResponse\n CodeExecutionUpdate:\n union:\n buildingExecutor:\n type: BuildingExecutorResponse\n docs: >-\n Statuses if an executor for the session isn't ready (Before\n RunningResponse).\n running:\n type: RunningResponse\n docs: Sent once a test submission is executing.\n errored:\n type: ErroredResponse\n docs: Sent if a submission cannot be run (i.e. Compile Error).\n stopped:\n type: StoppedResponse\n docs: Sent if a submission is stopped.\n graded:\n type: GradedResponse\n docs: Graded testcases without trace information.\n gradedV2:\n type: GradedResponseV2\n docs: Graded submission for v2 problems.\n workspaceRan:\n type: WorkspaceRanResponse\n docs: Workspace run without trace information.\n recording:\n type: RecordingResponseNotification\n docs: Gives progress about what is being recorded.\n recorded:\n type: RecordedResponseNotification\n docs: Graded testcases with trace information.\n invalidRequest:\n type: InvalidRequestResponse\n docs: Sent if an invalid request is sent for a submission.\n finished:\n type: FinishedResponse\n docs: Sent once a submission is graded and fully recorded.\n BuildingExecutorResponse:\n properties:\n submissionId: SubmissionId\n status: ExecutionSessionStatus\n RunningResponse:\n properties:\n submissionId: SubmissionId\n state: RunningSubmissionState\n RunningSubmissionState:\n enum:\n - QUEUEING_SUBMISSION\n - KILLING_HISTORICAL_SUBMISSIONS\n - WRITING_SUBMISSION_TO_FILE\n - COMPILING_SUBMISSION\n - RUNNING_SUBMISSION\n ErroredResponse:\n properties:\n submissionId: SubmissionId\n errorInfo: ErrorInfo\n ErrorInfo:\n union:\n compileError: CompileError\n runtimeError:\n type: RuntimeError\n docs: >\n If the submission cannot be executed and throws a runtime error before\n getting to any of the testcases.\n internalError:\n type: InternalError\n docs: |\n If the trace backend encounters an unexpected error.\n CompileError:\n properties:\n message: string\n RuntimeError:\n properties:\n message: string\n InternalError:\n properties:\n exceptionInfo: ExceptionInfo\n StoppedResponse:\n properties:\n submissionId: SubmissionId\n WorkspaceRanResponse:\n properties:\n submissionId: SubmissionId\n runDetails: WorkspaceRunDetails\n WorkspaceRunDetails:\n properties:\n exceptionV2: optional\n exception: optional\n stdout: string\n GradedResponse:\n properties:\n submissionId: SubmissionId\n testCases: map\n GradedResponseV2:\n properties:\n submissionId: SubmissionId\n testCases: map\n TestCaseGrade:\n union:\n hidden: TestCaseHiddenGrade\n nonHidden: TestCaseNonHiddenGrade\n TestCaseHiddenGrade:\n properties:\n passed: boolean\n TestCaseNonHiddenGrade:\n properties:\n passed: boolean\n actualResult: optional\n exception: optional\n stdout: string\n RecordedResponseNotification:\n properties:\n submissionId: SubmissionId\n traceResponsesSize: integer\n testCaseId: optional\n RecordingResponseNotification:\n properties:\n submissionId: SubmissionId\n testCaseId: optional\n lineNumber: integer\n lightweightStackInfo: LightweightStackframeInformation\n tracedFile: optional\n LightweightStackframeInformation:\n properties:\n numStackFrames: integer\n topStackFrameMethodName: string\n TestCaseResultWithStdout:\n properties:\n result: TestCaseResult\n stdout: string\n TestCaseResult:\n properties:\n expectedResult: commons.VariableValue\n actualResult: ActualResult\n passed: boolean\n ActualResult:\n union:\n value: commons.VariableValue\n exception: ExceptionInfo\n exceptionV2: ExceptionV2\n ExceptionV2:\n union:\n generic: ExceptionInfo\n timeout: commons.EmptyObject\n ExceptionInfo:\n properties:\n exceptionType: string\n exceptionMessage: string\n exceptionStacktrace: string\n InvalidRequestResponse:\n properties:\n request: SubmissionRequest\n cause: InvalidRequestCause\n InvalidRequestCause:\n union:\n submissionIdNotFound:\n type: SubmissionIdNotFound\n docs: The submission request references a submission id that doesn't exist.\n customTestCasesUnsupported:\n type: CustomTestCasesUnsupported\n unexpectedLanguage:\n type: UnexpectedLanguageError\n docs: The submission request was routed to an incorrect language executor.\n ExistingSubmissionExecuting:\n properties:\n submissionId: SubmissionId\n SubmissionIdNotFound:\n properties:\n missingSubmissionId: SubmissionId\n CustomTestCasesUnsupported:\n properties:\n problemId: commons.ProblemId\n submissionId: SubmissionId\n UnexpectedLanguageError:\n properties:\n expectedLanguage: commons.Language\n actualLanguage: commons.Language\n TerminatedResponse:\n properties: {}\n FinishedResponse:\n properties:\n submissionId: SubmissionId\n StdoutResponse:\n properties:\n submissionId: SubmissionId\n stdout: string\n StderrResponse:\n properties:\n submissionId: SubmissionId\n stderr: string\n TraceResponse:\n properties:\n submissionId: SubmissionId\n lineNumber: integer\n returnValue: optional\n expressionLocation: optional\n stack: StackInformation\n stdout: optional\n TraceResponseV2:\n properties:\n submissionId: SubmissionId\n lineNumber: integer\n file: TracedFile\n returnValue: optional\n expressionLocation: optional\n stack: StackInformation\n stdout: optional\n TracedFile:\n properties:\n filename: string\n directory: string\n ExpressionLocation:\n properties:\n start: integer\n offset: integer\n StackInformation:\n properties:\n numStackFrames: integer\n topStackFrame: optional\n StackFrame:\n properties:\n methodName: string\n lineNumber: integer\n scopes: list\n Scope:\n properties:\n variables: map\n ExecutionSessionResponse:\n properties:\n sessionId: string\n executionSessionUrl: optional\n language: commons.Language\n status: ExecutionSessionStatus\n ExecutionSessionStatus:\n enum:\n - CREATING_CONTAINER\n - PROVISIONING_CONTAINER\n - PENDING_CONTAINER\n - RUNNING_CONTAINER\n - LIVE_CONTAINER\n - FAILED_TO_LAUNCH\n SubmissionStateV2:\n properties:\n timeSubmitted: datetime\n language: commons.Language\n submissionFiles: list\n submissionStatus: SubmissionStatusV2\n SubmissionStatusV2:\n union:\n test: TestSubmissionStatusV2\n workspace: WorkspaceSubmissionStatusV2\n TestSubmissionStatusV2:\n properties:\n updates: list\n problemId: commons.ProblemId\n problemVersion: integer\n problemInfo: problemV2.ProblemInfoV2\n WorkspaceSubmissionStatusV2:\n properties:\n updates: list\n TestSubmissionUpdate:\n properties:\n updateTime: datetime\n updateInfo: TestSubmissionUpdateInfo\n TestSubmissionUpdateInfo:\n union:\n running: RunningSubmissionState\n stopped: commons.EmptyObject\n errored: ErrorInfo\n gradedTestCase: GradedTestCaseUpdate\n recordedTestCase: RecordedTestCaseUpdate\n finished: commons.EmptyObject\n WorkspaceSubmissionUpdate:\n properties:\n updateTime: datetime\n updateInfo: WorkspaceSubmissionUpdateInfo\n WorkspaceSubmissionUpdateInfo:\n union:\n running: RunningSubmissionState\n ran: WorkspaceRunDetails\n stopped: commons.EmptyObject\n traced: commons.EmptyObject\n tracedV2: WorkspaceTracedUpdate\n errored: ErrorInfo\n finished: commons.EmptyObject\n GradedTestCaseUpdate:\n properties:\n testCaseId: problemV2.TestCaseId\n grade: TestCaseGrade\n RecordedTestCaseUpdate:\n properties:\n testCaseId: problemV2.TestCaseId\n traceResponsesSize: integer\n WorkspaceTracedUpdate:\n properties:\n traceResponsesSize: integer\n SubmissionState:\n properties:\n timeSubmitted: optional\n submission: string\n language: commons.Language\n submissionTypeState: SubmissionTypeState\n SubmissionTypeState:\n union:\n test: TestSubmissionState\n workspace: WorkspaceSubmissionState\n WorkspaceSubmissionState:\n properties:\n status: WorkspaceSubmissionStatus\n WorkspaceSubmissionStatus:\n union:\n stopped: commons.EmptyObject\n errored: ErrorInfo\n running: RunningSubmissionState\n ran: WorkspaceRunDetails\n traced: WorkspaceRunDetails\n TestSubmissionState:\n properties:\n problemId: commons.ProblemId\n defaultTestCases: list\n customTestCases: list\n status: TestSubmissionStatus\n TestSubmissionStatus:\n union:\n stopped: commons.EmptyObject\n errored: ErrorInfo\n running: RunningSubmissionState\n testCaseIdToState: map\n SubmissionStatusForTestCase:\n union:\n graded: TestCaseResultWithStdout\n gradedV2: TestCaseGrade\n traced: TracedTestCase\n TracedTestCase:\n properties:\n result: TestCaseResultWithStdout\n traceResponsesSize: integer\n TraceResponsesPage:\n properties:\n offset:\n type: optional\n docs: |\n If present, use this to load subseqent pages.\n The offset is the id of the next trace response to load.\n traceResponses: list\n TraceResponsesPageV2:\n properties:\n offset:\n type: optional\n docs: |\n If present, use this to load subseqent pages.\n The offset is the id of the next trace response to load.\n traceResponses: list\n GetTraceResponsesPageRequest:\n properties:\n offset:\n type: optional\n WorkspaceStarterFilesResponse:\n properties:\n files: map\n WorkspaceStarterFilesResponseV2:\n properties:\n filesByLanguage: map\n WorkspaceFiles:\n properties:\n mainFile: commons.FileInfo\n readOnlyFiles: list\n ExecutionSessionsState:\n properties:\n states: map\n numWarmingInstances: optional\n warmingSessionIds: list\n ExecutionSessionState:\n properties:\n lastTimeContacted: optional\n sessionId: string\n isWarmInstance: boolean\n awsTaskId: optional\n language: commons.Language\n status: ExecutionSessionStatus\nimports:\n commons: ../commons/__package__.yml\n problemV2: ../ProblemInfoServicV2/__package__.yml\nservice:\n auth: false\n base-path: ''\n endpoints:\n getWorkspaceStarterFiles:\n auth: true\n path: /get-workspace-starter-files\n method: GET\n response: WorkspaceStarterFilesResponse\n getWorkspaceStarterFilesV2:\n auth: true\n path: /get-workspace-starter-files-v2\n method: GET\n response: WorkspaceStarterFilesResponseV2\n", + "rawContents": "service:\n auth: false\n base-path: /workspace\n endpoints:\n getWorkspaceStarterFiles:\n auth: true\n path: /get-workspace-starter-files\n method: GET\n response: WorkspaceStarterFilesResponse\n getWorkspaceStarterFilesV2:\n auth: true\n path: /get-workspace-starter-files-v2\n method: GET\n response: WorkspaceStarterFilesResponseV2\ntypes:\n SubmissionId:\n type: string\n ShareId:\n type: string\n SubmissionRequest:\n union:\n initializeProblemRequest: InitializeProblemRequest\n initializeWorkspaceRequest: commons.EmptyObject\n submitV2: SubmitRequestV2\n workspaceSubmit: WorkspaceSubmitRequest\n stop: StopRequest\n InitializeProblemRequest:\n properties:\n problemId: commons.ProblemId\n problemVersion: optional\n SubmitRequestV2:\n properties:\n submissionId: SubmissionId\n language: commons.Language\n submissionFiles: list\n problemId: commons.ProblemId\n problemVersion: optional\n userId: optional\n WorkspaceSubmitRequest:\n properties:\n submissionId: SubmissionId\n language: commons.Language\n submissionFiles: list\n userId: optional\n SubmissionFileInfo:\n properties:\n directory: string\n filename: string\n contents: string\n SubmissionTypeEnum:\n enum:\n - TEST\n StopRequest:\n properties:\n submissionId: SubmissionId\n SubmissionResponse:\n union:\n serverInitialized: commons.EmptyObject\n problemInitialized: commons.ProblemId\n workspaceInitialized: commons.EmptyObject\n serverErrored: ExceptionInfo\n codeExecutionUpdate: CodeExecutionUpdate\n terminated: TerminatedResponse\n CodeExecutionUpdate:\n union:\n buildingExecutor:\n type: BuildingExecutorResponse\n docs: >-\n Statuses if an executor for the session isn't ready (Before\n RunningResponse).\n running:\n type: RunningResponse\n docs: Sent once a test submission is executing.\n errored:\n type: ErroredResponse\n docs: Sent if a submission cannot be run (i.e. Compile Error).\n stopped:\n type: StoppedResponse\n docs: Sent if a submission is stopped.\n graded:\n type: GradedResponse\n docs: Graded testcases without trace information.\n gradedV2:\n type: GradedResponseV2\n docs: Graded submission for v2 problems.\n workspaceRan:\n type: WorkspaceRanResponse\n docs: Workspace run without trace information.\n recording:\n type: RecordingResponseNotification\n docs: Gives progress about what is being recorded.\n recorded:\n type: RecordedResponseNotification\n docs: Graded testcases with trace information.\n invalidRequest:\n type: InvalidRequestResponse\n docs: Sent if an invalid request is sent for a submission.\n finished:\n type: FinishedResponse\n docs: Sent once a submission is graded and fully recorded.\n BuildingExecutorResponse:\n properties:\n submissionId: SubmissionId\n status: ExecutionSessionStatus\n RunningResponse:\n properties:\n submissionId: SubmissionId\n state: RunningSubmissionState\n RunningSubmissionState:\n enum:\n - QUEUEING_SUBMISSION\n - KILLING_HISTORICAL_SUBMISSIONS\n - WRITING_SUBMISSION_TO_FILE\n - COMPILING_SUBMISSION\n - RUNNING_SUBMISSION\n ErroredResponse:\n properties:\n submissionId: SubmissionId\n errorInfo: ErrorInfo\n ErrorInfo:\n union:\n compileError: CompileError\n runtimeError:\n type: RuntimeError\n docs: >\n If the submission cannot be executed and throws a runtime error before\n getting to any of the testcases.\n internalError:\n type: InternalError\n docs: |\n If the trace backend encounters an unexpected error.\n CompileError:\n properties:\n message: string\n RuntimeError:\n properties:\n message: string\n InternalError:\n properties:\n exceptionInfo: ExceptionInfo\n StoppedResponse:\n properties:\n submissionId: SubmissionId\n WorkspaceRanResponse:\n properties:\n submissionId: SubmissionId\n runDetails: WorkspaceRunDetails\n WorkspaceRunDetails:\n properties:\n exceptionV2: optional\n exception: optional\n stdout: string\n GradedResponse:\n properties:\n submissionId: SubmissionId\n testCases: map\n GradedResponseV2:\n properties:\n submissionId: SubmissionId\n testCases: map\n TestCaseGrade:\n union:\n hidden: TestCaseHiddenGrade\n nonHidden: TestCaseNonHiddenGrade\n TestCaseHiddenGrade:\n properties:\n passed: boolean\n TestCaseNonHiddenGrade:\n properties:\n passed: boolean\n actualResult: optional\n exception: optional\n stdout: string\n RecordedResponseNotification:\n properties:\n submissionId: SubmissionId\n traceResponsesSize: integer\n testCaseId: optional\n RecordingResponseNotification:\n properties:\n submissionId: SubmissionId\n testCaseId: optional\n lineNumber: integer\n lightweightStackInfo: LightweightStackframeInformation\n tracedFile: optional\n LightweightStackframeInformation:\n properties:\n numStackFrames: integer\n topStackFrameMethodName: string\n TestCaseResultWithStdout:\n properties:\n result: TestCaseResult\n stdout: string\n TestCaseResult:\n properties:\n expectedResult: commons.VariableValue\n actualResult: ActualResult\n passed: boolean\n ActualResult:\n union:\n value: commons.VariableValue\n exception: ExceptionInfo\n exceptionV2: ExceptionV2\n ExceptionV2:\n union:\n generic: ExceptionInfo\n timeout: commons.EmptyObject\n ExceptionInfo:\n properties:\n exceptionType: string\n exceptionMessage: string\n exceptionStacktrace: string\n InvalidRequestResponse:\n properties:\n request: SubmissionRequest\n cause: InvalidRequestCause\n InvalidRequestCause:\n union:\n submissionIdNotFound:\n type: SubmissionIdNotFound\n docs: The submission request references a submission id that doesn't exist.\n customTestCasesUnsupported:\n type: CustomTestCasesUnsupported\n unexpectedLanguage:\n type: UnexpectedLanguageError\n docs: The submission request was routed to an incorrect language executor.\n ExistingSubmissionExecuting:\n properties:\n submissionId: SubmissionId\n SubmissionIdNotFound:\n properties:\n missingSubmissionId: SubmissionId\n CustomTestCasesUnsupported:\n properties:\n problemId: commons.ProblemId\n submissionId: SubmissionId\n UnexpectedLanguageError:\n properties:\n expectedLanguage: commons.Language\n actualLanguage: commons.Language\n TerminatedResponse:\n properties: {}\n FinishedResponse:\n properties:\n submissionId: SubmissionId\n StdoutResponse:\n properties:\n submissionId: SubmissionId\n stdout: string\n StderrResponse:\n properties:\n submissionId: SubmissionId\n stderr: string\n TraceResponse:\n properties:\n submissionId: SubmissionId\n lineNumber: integer\n returnValue: optional\n expressionLocation: optional\n stack: StackInformation\n stdout: optional\n TraceResponseV2:\n properties:\n submissionId: SubmissionId\n lineNumber: integer\n file: TracedFile\n returnValue: optional\n expressionLocation: optional\n stack: StackInformation\n stdout: optional\n TracedFile:\n properties:\n filename: string\n directory: string\n ExpressionLocation:\n properties:\n start: integer\n offset: integer\n StackInformation:\n properties:\n numStackFrames: integer\n topStackFrame: optional\n StackFrame:\n properties:\n methodName: string\n lineNumber: integer\n scopes: list\n Scope:\n properties:\n variables: map\n ExecutionSessionResponse:\n properties:\n sessionId: string\n executionSessionUrl: optional\n language: commons.Language\n status: ExecutionSessionStatus\n ExecutionSessionStatus:\n enum:\n - CREATING_CONTAINER\n - PROVISIONING_CONTAINER\n - PENDING_CONTAINER\n - RUNNING_CONTAINER\n - LIVE_CONTAINER\n - FAILED_TO_LAUNCH\n SubmissionStateV2:\n properties:\n timeSubmitted: datetime\n language: commons.Language\n submissionFiles: list\n submissionStatus: SubmissionStatusV2\n SubmissionStatusV2:\n union:\n test: TestSubmissionStatusV2\n workspace: WorkspaceSubmissionStatusV2\n TestSubmissionStatusV2:\n properties:\n updates: list\n problemId: commons.ProblemId\n problemVersion: integer\n problemInfo: problemV2.ProblemInfoV2\n WorkspaceSubmissionStatusV2:\n properties:\n updates: list\n TestSubmissionUpdate:\n properties:\n updateTime: datetime\n updateInfo: TestSubmissionUpdateInfo\n TestSubmissionUpdateInfo:\n union:\n running: RunningSubmissionState\n stopped: commons.EmptyObject\n errored: ErrorInfo\n gradedTestCase: GradedTestCaseUpdate\n recordedTestCase: RecordedTestCaseUpdate\n finished: commons.EmptyObject\n WorkspaceSubmissionUpdate:\n properties:\n updateTime: datetime\n updateInfo: WorkspaceSubmissionUpdateInfo\n WorkspaceSubmissionUpdateInfo:\n union:\n running: RunningSubmissionState\n ran: WorkspaceRunDetails\n stopped: commons.EmptyObject\n traced: commons.EmptyObject\n tracedV2: WorkspaceTracedUpdate\n errored: ErrorInfo\n finished: commons.EmptyObject\n GradedTestCaseUpdate:\n properties:\n testCaseId: problemV2.TestCaseId\n grade: TestCaseGrade\n RecordedTestCaseUpdate:\n properties:\n testCaseId: problemV2.TestCaseId\n traceResponsesSize: integer\n WorkspaceTracedUpdate:\n properties:\n traceResponsesSize: integer\n SubmissionState:\n properties:\n timeSubmitted: optional\n submission: string\n language: commons.Language\n submissionTypeState: SubmissionTypeState\n SubmissionTypeState:\n union:\n test: TestSubmissionState\n workspace: WorkspaceSubmissionState\n WorkspaceSubmissionState:\n properties:\n status: WorkspaceSubmissionStatus\n WorkspaceSubmissionStatus:\n union:\n stopped: commons.EmptyObject\n errored: ErrorInfo\n running: RunningSubmissionState\n ran: WorkspaceRunDetails\n traced: WorkspaceRunDetails\n TestSubmissionState:\n properties:\n problemId: commons.ProblemId\n defaultTestCases: list\n customTestCases: list\n status: TestSubmissionStatus\n TestSubmissionStatus:\n union:\n stopped: commons.EmptyObject\n errored: ErrorInfo\n running: RunningSubmissionState\n testCaseIdToState: map\n SubmissionStatusForTestCase:\n union:\n graded: TestCaseResultWithStdout\n gradedV2: TestCaseGrade\n traced: TracedTestCase\n TracedTestCase:\n properties:\n result: TestCaseResultWithStdout\n traceResponsesSize: integer\n TraceResponsesPage:\n properties:\n offset:\n type: optional\n docs: |\n If present, use this to load subseqent pages.\n The offset is the id of the next trace response to load.\n traceResponses: list\n TraceResponsesPageV2:\n properties:\n offset:\n type: optional\n docs: |\n If present, use this to load subseqent pages.\n The offset is the id of the next trace response to load.\n traceResponses: list\n GetTraceResponsesPageRequest:\n properties:\n offset:\n type: optional\n WorkspaceStarterFilesResponse:\n properties:\n files: map\n WorkspaceStarterFilesResponseV2:\n properties:\n filesByLanguage: map\n WorkspaceFiles:\n properties:\n mainFile: commons.FileInfo\n readOnlyFiles: list\n ExecutionSessionsState:\n properties:\n states: map\n numWarmingInstances: optional\n warmingSessionIds: list\n ExecutionSessionState:\n properties:\n lastTimeContacted: optional\n sessionId: string\n isWarmInstance: boolean\n awsTaskId: optional\n language: commons.Language\n status: ExecutionSessionStatus\nimports:\n commons: ../commons/__package__.yml\n problemV2: ../ProblemInfoServicV2/__package__.yml\n", "contents": { + "service": { + "auth": false, + "base-path": "/workspace", + "endpoints": { + "getWorkspaceStarterFiles": { + "auth": true, + "path": "/get-workspace-starter-files", + "method": "GET", + "response": "WorkspaceStarterFilesResponse" + }, + "getWorkspaceStarterFilesV2": { + "auth": true, + "path": "/get-workspace-starter-files-v2", + "method": "GET", + "response": "WorkspaceStarterFilesResponseV2" + } + } + }, "types": { "SubmissionId": { "type": "string" @@ -3266,24 +3284,6 @@ "imports": { "commons": "../commons/__package__.yml", "problemV2": "../ProblemInfoServicV2/__package__.yml" - }, - "service": { - "auth": false, - "base-path": "", - "endpoints": { - "getWorkspaceStarterFiles": { - "auth": true, - "path": "/get-workspace-starter-files", - "method": "GET", - "response": "WorkspaceStarterFilesResponse" - }, - "getWorkspaceStarterFilesV2": { - "auth": true, - "path": "/get-workspace-starter-files-v2", - "method": "GET", - "response": "WorkspaceStarterFilesResponseV2" - } - } } } }, diff --git a/packages/cli/api-importers/conjure/conjure-to-fern/src/ConjureImporter.ts b/packages/cli/api-importers/conjure/conjure-to-fern/src/ConjureImporter.ts index 7135d681499..81af47fdac4 100644 --- a/packages/cli/api-importers/conjure/conjure-to-fern/src/ConjureImporter.ts +++ b/packages/cli/api-importers/conjure/conjure-to-fern/src/ConjureImporter.ts @@ -1,6 +1,6 @@ import { AbsoluteFilePath, dirname, join, RelativeFilePath, relativize, getFilename } from "@fern-api/fs-utils"; import { DefinitionFile } from "@fern-api/conjure-sdk"; -import { APIDefinitionImporter, FernDefinitionBuilderImpl } from "@fern-api/importer-commons"; +import { APIDefinitionImporter, FernDefinitionBuilderImpl, HttpServiceInfo } from "@fern-api/importer-commons"; import { visitConjureTypeDeclaration } from "./utils/visitConjureTypeDeclaration"; import { parseEndpointLocator, removeSuffix } from "@fern-api/core-utils"; import { listConjureFiles } from "./utils/listConjureFiles"; @@ -100,6 +100,15 @@ export class ConjureImporter extends APIDefinitionImporter const unsuffixedServiceName = removeSuffix({ value: serviceName, suffix: "Service" }); const fernFilePath = RelativeFilePath.of(`${unsuffixedServiceName}/__package__.yml`); + const httpServiceInfo: HttpServiceInfo = {}; + if (serviceDeclaration.basePath != null) { + httpServiceInfo["base-path"] = serviceDeclaration.basePath; + } + if (serviceDeclaration.docs != null) { + httpServiceInfo.docs = serviceDeclaration.docs; + } + this.fernDefinitionBuilder.setServiceInfo(fernFilePath, httpServiceInfo); + this.importAllTypes({ conjureFile: definition, fernFilePath }); for (const [import_, importedFilepath] of Object.entries(definition.types?.conjureImports ?? {})) { diff --git a/packages/cli/api-importers/openapi/openapi-ir-to-fern/src/buildServices.ts b/packages/cli/api-importers/openapi/openapi-ir-to-fern/src/buildServices.ts index 84fbf748c29..5c06a3bc165 100644 --- a/packages/cli/api-importers/openapi/openapi-ir-to-fern/src/buildServices.ts +++ b/packages/cli/api-importers/openapi/openapi-ir-to-fern/src/buildServices.ts @@ -45,7 +45,7 @@ export function buildServices(context: OpenApiIrConverterContext): { }); if (irTag?.id != null || irTag?.description != null) { context.builder.setServiceInfo(file, { - displayName: group?.summary ?? irTag?.id, + "display-name": group?.summary ?? irTag?.id, docs: group?.description ?? irTag?.description ?? undefined }); } diff --git a/packages/cli/cli/versions.yml b/packages/cli/cli/versions.yml index c60851af4c3..2448b3009bb 100644 --- a/packages/cli/cli/versions.yml +++ b/packages/cli/cli/versions.yml @@ -1,3 +1,10 @@ +- changelogEntry: + - summary: | + The Conjure importer now correctly imports base-path and docs from your conjure definition. + type: fix + irVersion: 53 + version: 0.45.0-rc15 + - changelogEntry: - summary: | The Fern CLI now uses a longer timeout to make HTTP requests, which should fix some flakyness with the docs registration process.