Skip to content

Commit fedb68c

Browse files
committed
Add MVP
1 parent 9c7f9c2 commit fedb68c

File tree

4 files changed

+87
-0
lines changed

4 files changed

+87
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea/

faf-api-specs.iml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="GENERAL_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$" />
6+
<orderEntry type="sourceFolder" forTests="false" />
7+
</component>
8+
</module>

lobby-to-client/v1/asyncapi.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
asyncapi: 3.0.0
2+
info:
3+
title: FAForever Lobby Server API
4+
version: 1.0.0
5+
description: |-
6+
Since AsyncAPI can only model a publish/subscribe model, this spec only covers the server side of the bidirectional lobby connection
7+
license:
8+
name: MIT
9+
url: https://www.apache.org/licenses/LICENSE-2.0
10+
defaultContentType: application/json
11+
servers:
12+
production:
13+
host: ws.faforever.com
14+
pathname: /
15+
protocol: wss
16+
test:
17+
host: ws.faforever.xyz
18+
pathname: /
19+
protocol: wss
20+
local:
21+
host: localhost
22+
pathname: /
23+
protocol: wss
24+
channels:
25+
server-inbound:
26+
title: server to client communication
27+
messages:
28+
JoinGameRequest:
29+
$ref: '#/components/messages/JoinGameRequest'
30+
client-inbound:
31+
title: client to server communication
32+
messages:
33+
JoinGameRequest:
34+
$ref: '#/components/messages/JoinGameRequest'
35+
operations:
36+
serverJoinGame:
37+
action: receive
38+
description: "Server receives clients request to join a game"
39+
channel:
40+
$ref: '#/channels/server-inbound'
41+
messages:
42+
- $ref: '#/channels/server-inbound/messages/JoinGameRequest'
43+
tags:
44+
- name: server
45+
clientJoinGame:
46+
action: send
47+
description: "Client requests to join a game"
48+
channel:
49+
$ref: '#/channels/client-inbound'
50+
messages:
51+
- $ref: '#/channels/client-inbound/messages/JoinGameRequest'
52+
tags:
53+
- name: client
54+
components:
55+
messages:
56+
JoinGameRequest:
57+
name: game_join
58+
title: "Request to join a game"
59+
payload:
60+
type: object
61+
required:
62+
- command
63+
- uid
64+
properties:
65+
command:
66+
type: string
67+
const: join_game
68+
uid:
69+
type: integer
70+
minimum: 1
71+
password:
72+
type: string

readme.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# FAF API specs
2+
3+
This repository contains API first specs of our application(s). Not all APIs can follow this approach as they are driven by other source (e.g. the faf-java-api spec is semi-automatically derived from the database schema).
4+
5+
6+
We support schemas for HTTP ([OpenAPI](https://www.openapis.org)) and messaging ([AsyncAPI](https://www.asyncapi.com/en)).

0 commit comments

Comments
 (0)