Skip to content

Commit

Permalink
Use Versioning package instead of deprecated service version
Browse files Browse the repository at this point in the history
  • Loading branch information
LadyCailin committed May 2, 2024
1 parent 9bd7984 commit dbb0e39
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 54 deletions.
13 changes: 12 additions & 1 deletion src/main/resources/apps.methodscript.com/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
import "@typespec/openapi";
import "@typespec/openapi3";
import "@typespec/http";
import "@typespec/versioning";

using TypeSpec.Http;
using TypeSpec.OpenAPI;
using TypeSpec.Versioning;


/**
* This is the api for the apps.methodscript.com server. This provides
Expand All @@ -31,9 +34,14 @@ using TypeSpec.OpenAPI;
url: "https://opensource.org/licenses/MIT"
},
})
@service({title: "MethodScript Apps", version: "1.0.0"})
@service({title: "MethodScript Apps"})
@versioned(Service.Version)
namespace Service;

enum Version {
v1_0_0: "1.0.0",
}

/**
* This call should always be successful.
*/
Expand All @@ -45,6 +53,7 @@ model Ping200 {
* Service related calls.
*/
@tag("meta")
@added(Version.v1_0_0)
interface meta {
/**
* Lists the services that are available on this server. In general,
Expand Down Expand Up @@ -121,6 +130,7 @@ model Telemetry403 {
* Telemetry related services.
*/
@tag("telemetry")
@added(Version.v1_0_0)
interface telemetry {

@summary("Obtains a telemetry key, which is used for future requests.")
Expand Down Expand Up @@ -216,6 +226,7 @@ model Build200 {
* Build system services.
*/
@tag("builds")
@added(Version.v1_0_0)
interface builds {
@summary("Provides a list of artifact types available for download.")
@route("/builds")
Expand Down
103 changes: 53 additions & 50 deletions src/main/resources/apps.methodscript.com/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/main/resources/apps.methodscript.com/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"type": "module",
"dependencies": {
"@typespec/compiler": "latest",
"@typespec/http": "^0.54.0",
"@typespec/openapi": "^0.54.0",
"@typespec/openapi3": "^0.54.0"
"@typespec/http": "^0.55.0",
"@typespec/openapi": "^0.55.0",
"@typespec/openapi3": "^0.55.0",
"@typespec/versioning": "^0.55.0"
},
"private": true
}

0 comments on commit dbb0e39

Please sign in to comment.